python pandas dataframe head() displays nothing

前端 未结 2 2161
时光说笑
时光说笑 2021-02-19 00:00

I am new to using pandas and I just don\'t know what to do with this :

I am using python. I have (properly) installed anaconda. In my file I simply create a DataFrame (f

相关标签:
2条回答
  • 2021-02-19 00:35

    You may expect this would show some row after seeing how other does. But this only appear only in terminal environment. Just like the above answer, you need an print() to show row while you are using ide

    0 讨论(0)
  • 2021-02-19 00:37

    You have to use:

    print(dataframe.head())
    print(dataframe['km'])
    print(dataframe[3:6])
    

    Without the print statement python is just selecting the data but not doing anything with it.

    0 讨论(0)
提交回复
热议问题