1

Now I'm taking a machine learning course. Now I should import my dataset after I read a "CSV" file to import my dataset I want to drop a column but I don't know how to do it.

alift
  • 1,855
  • 2
  • 13
  • 28
omar 5552039
  • 21
  • 1
  • 1
  • 2
  • 4
    `df = df.drop('col_name', axis=1)` – James May 30 '19 at 01:08
  • These kind of questions are easily answered by perusing the docs. – suvayu May 30 '19 at 02:12
  • @omar: I suggest you first try to search for your question in StackOverflow, and only if you do not find an answer, then ask the question. Good luck with your machine learning courses as well! ML is fun! – alift May 30 '19 at 04:50

1 Answers1

2

Let's assume LIKES as column, how to drop it?

df.drop('LIKES', axis=1, inplace=True) 
Mazen Alhrazi
  • 336
  • 1
  • 3
  • 10