Home > Mobile >  dataframe.get(['param1', 'param2']) returning Nonetype even when the columns act
dataframe.get(['param1', 'param2']) returning Nonetype even when the columns act

Time:06-04

I have a dataframe called 'merged'. On running merged.info(), I get

merged.info()

This is when I print the dataframe.

merged

All the columns and values in the dataframe are defined and non null.

But the following code, print(merged.get(['PM2.5_CF1_ug/m3', 'Uptime Minutes', 'RSSI_dbm', 'Temperature_F', 'Humidity_%'])) prints None instead of printing the values. This is something which is happening suddenly without changing anything in the code. I even tried loading the merged dataframe completely. I am confident that it is a pandas issue but I couldnt find the solution anywhere to this. Please help me resolve this.

Ran the code on google colab Pandas version: 1.3.5

enter image description here

CodePudding user response:

You have a typo in UptimeMinutes. You wrote 'Uptime Minutes' instead

  • Related