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

Hey. Can someone tell me why I get this error?

I solved the problem. Here is my steps:

  1. I typed dir(data)
    This also shows attributes of data. But it is much more reliable than .info(), I guess.
  2. In the output, all columns were listed except px1.
  3. I opened the actual .csv file and saw that there is a space after px1. I mean it was like that “…pt1,pt2,px1 ,px2,py1…”
  4. I deleted that space. Then it worked.
1 Like