A problem in using Dataframe :module 'pandas' has no attribute 'Dataframe'

Question:

For the following line of code:

Distance1= pd.Dataframe(columns=['Lat','Lon','PSC','SC_Avg_EcNo','SC_Avg_RSCP','MaxRSCP','MaxEcNo','count','PilotPollutionFlag'])

I got the error :

AttributeError: module ‘pandas’ has no attribute ‘Dataframe’

I’ve seen similar questions like this and most of the answers were that either a file called ‘pandas.py’ is in the same directory as script, or that another variable called ‘pd’ is used in the program
but that doesn’t happen in my program so what is the problem ?

Asked By: Heba R

||

Answers:

Typo, it should be DataFrame

                  ^

Note the letter ‘F’ has to be capitalized.

Answered By: smci
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.