0

I want to add a row at the end of my dataframe but it shows some error.

data = data.loc[[0, 8, 11, 14, 18, 23, 41, 42, 43]]
row = {'Department/Ministry': 'OTHERS', 'Fund alloted(in ?crores)': 592971.08}  # Corrected value type
data = data.append(row, ignore_index=True)
print(data)

I used this code to add a row but it gave the error:

AttributeError: 'DataFrame' object has no attribute 'append'

2

0