-1

I am new to python and I wanted to test a simple online ML application using TensorFlow and pandas. I want to drop the Date column and I looked online at the Pandas documentation for dropping a column from the data variable, but I'm still having an issue.

enter image description here

enter image description here enter image description here

AloneTogether
  • 25,814
  • 5
  • 20
  • 39
datowlcs
  • 101
  • 10
  • 1
    Does this answer your question? [Delete a column from a Pandas DataFrame](https://stackoverflow.com/questions/13411544/delete-a-column-from-a-pandas-dataframe) – 吴慈霆 Dec 15 '22 at 03:11

1 Answers1

1

See the documentation of drop.

https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.drop.html

data.drop(columns='Date')

or

data.drop('Date', axis=1)
吴慈霆
  • 523
  • 2
  • 15
  • Ah, I must have seem some former documentation. Thank you - I just removed the brackets and it resolved the issue. – datowlcs Dec 15 '22 at 03:18