How to do it...

To insert rows at the end of the DataFrame, run the code in the following cell:

df2 = pd.DataFrame([['Notepad', 12, 4.25],
['Binder', 8, 5.68]],
index=[230015, 211040],
columns = ['item', 'inventory', 'unit_price']
df3 = df1.append(df2)

To delete rows from a DataFrame, use the following code:

df4 = df3.drop([230015, 211040])
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset