Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- df.loc[5,:] = ['Sergio Ramus', 'Spain', 'Real Madrid', True, 1.84, 5] # add one row at the end
- new_df = pd.DataFrame(
- data = [['Sergio Ramus', 'Spain', 'Real Madrid', True, 1.84, 5],
- ['Van Nistelroy', 'Spain', 'Real Madrid', True, 1.70, 5]]
- columns = df.columns
- ) # create new dataframe with many rows
- df = df.append(new_df, ignore_index = True) # append the new dataframe into previous dataframe
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement