Getting rid of words when getting average using pandas
I have another question once again relating to Python and Pandas, it is the same project I described on my previous post.
So I have these commands:
AKInitialInvest = df.iloc[0:19, 7:8]
AK_Ini_Inv_AVG = AKInitialInvest.mean(axis= 0 , skipna=False)
The first command selects part of a column in a pandas dataframe. The second command calculates the average for the data in the column.
It worked as intended but it would always print something like this:
loan_investment_amount 250125.0
The loan_investment_amount is the header of the column from the original csv file I am using. How do I get rid of the header without deleting it from the csv file? Thank you and happy holidays.
from Recent Questions - Stack Overflow https://ift.tt/38GVPlV
https://ift.tt/eA8V8J
Comments
Post a Comment