0
Insert new rows in a DataFrame
Hey guys, I’m learning DataFrame via this app recently. When learning these contents, I found that only creating new columns was shown in them. I wonder about how do we insert new rows in an already existing DataFrame. Creating columns can be done like this: import pandas as pd df = pd.read_csv("https://www.sololearn.com/uploads/ca-covid.csv") df.drop('state', axis=1, inplace=True) df['month'] = pd.to_datetime(df['date'], format="%d.%m.%y").dt.month_name() Can anybody show me how to insert rows? Thanks!
1 ответ
+ 1