Categories Python Answers How to delete a column from a Python Pandas DataFrame? Post author By John Au-Yeung Post date March 26, 2022 No Comments on How to delete a column from a Python Pandas DataFrame? Spread the love To delete a column from a Python Pandas DataFrame, we call the drop method. For instance, we write df = df.drop('column_name', 1) to call df.drop to drop the column_name column and 1 means this is the only column we drop. Related Posts How to delete a column from a Python Pandas DataFrame?To delete a column from a Python Pandas DataFrame, we call the drop method. For… How to delete a DataFrame row in Python Pandas based on column value?To delete a DataFrame row in Python Pandas based on column value, we can set… How to sort Python Pandas dataframe from one column?Sometimes, we want to sort Python Pandas dataframe from one column. In this article, we'll… By John Au-Yeung Web developer specializing in React, Vue, and front end development. View Archive → ← How to convert JSON to a Python Pandas DataFrame? → How to fix UnicodeDecodeError when reading CSV file in Pandas with Pytho? Leave a Reply Cancel replyYour email address will not be published. Required fields are marked *Comment * Name * Email * Website Save my name, email, and website in this browser for the next time I comment. Current ye@r * Leave this field empty