Took me way too long to find an answer that actually worked for me. See below.

df = df.rename_axis(None, axis=1)

I'm sure some of these other answers are working for other people, but they definitely didn't work for me :(

Answer from Matthew Withrow on Stack Overflow
🌐
Statology
statology.org › home › how to remove index name in pandas (with example)
How to Remove Index Name in Pandas (With Example)
January 2, 2023 - This tutorial explains how to remove the index name from a pandas DataFrame, including an example.
🌐
Pandas
pandas.pydata.org › docs › reference › api › pandas.DataFrame.drop.html
pandas.DataFrame.drop — pandas 3.0.3 documentation
For MultiIndex, level from which the labels will be removed. ... If False, return a copy. Otherwise, do operation in place and return None. errors{‘ignore’, ‘raise’}, default ‘raise’ · If ‘ignore’, suppress error and only existing labels are dropped. ... Returns DataFrame or None DataFrame with the specified index or column labels removed or None if inplace=True.
🌐
Arab Psychology
scales.arabpsychology.com › home › is there any way to remove index name in pandas dataframe?
Is There Any Way To Remove Index Name In Pandas Dataframe?
November 22, 2025 - This function is particularly useful because it aligns with the functional programming paradigm common in Pandas, allowing for method chaining and offering parameters for controlling in-place modifications. The primary benefit of using df.rename_axis() over direct assignment is consistency, especially when dealing with MultiIndex objects or when requiring an operation that returns a new DataFrame rather than modifying the existing one in place. To remove the index name using this method, you simply specify axis=’index’ (or axis=0) and pass None as the new name.
🌐
Pandas
pandas.pydata.org › docs › reference › api › pandas.DataFrame.reset_index.html
pandas.DataFrame.reset_index — pandas 3.0.3 documentation
>>> df.reset_index(names=["classes", "names"]) classes names speed species max type 0 bird falcon 389.0 fly 1 bird parrot 24.0 fly 2 mammal lion 80.5 run 3 mammal monkey NaN jump
🌐
Data Science Dojo
discuss.datasciencedojo.com › python
How can I delete the index in a Pandas DataFrame? - Python - Data Science Dojo Discussions
May 4, 2023 - Hi all, I’m working with a Pandas DataFrame and I’m having trouble removing the index name. I’ve set the name of the index using the df.index.name attribute, but now I want to remove it. Here’s the code I’ve tried so fa…
🌐
Medium
medium.com › @heyamit10 › understanding-how-to-drop-an-index-in-pandas-6c011d0d3764
Understanding How to Drop an Index in Pandas | by Hey Amit | Medium
March 6, 2025 - Dropping an index simply means removing specific rows from your DataFrame based on these identifiers. That’s it. No rocket science here. Here’s where the magic begins. Let’s start with a simple DataFrame: import pandas as pd # Sample DataFrame data = {'Name': ['Alice', 'Bob', 'Charlie'], 'Age': [25, 30, 35]} df = pd.DataFrame(data) # Dropping index 1 new_df = df.drop(index=1) print(new_df)
🌐
GeeksforGeeks
geeksforgeeks.org › pandas › how-to-drop-the-index-column-in-pandas
How to Drop Index Column in Pandas? - GeeksforGeeks
July 23, 2025 - import pandas as pd data = pd.DataFrame({ "id": [7058, 7059, 7072, 7054], "name": ['Sravan', 'Jyothika', 'Harsha', 'Ramya'], "subjects": ['Java', 'Python', 'HTML/PHP', 'PHP/JS'] }) # Set a custom index data.index = ['student-1', 'student-2', 'student-3', 'student-4'] print('DataFrame with Custom Index:') print(data) data.reset_index(drop=True, inplace=True) print('\nDataFrame after Dropping Index:') print(data) ... Removing Unnecessary Indexes: After filtering or manipulating rows, you may end up with non-sequential or unwanted indexes.
Find elsewhere
🌐
Altcademy
altcademy.com › blog › how-to-remove-index-column-in-pandas
How to remove index column in Pandas - Altcademy.com
January 11, 2024 - The 'Name' index is gone, and the DataFrame now has a simple integer-based index. A MultiIndex DataFrame has multiple levels of indexing, which is similar to having subcategories within categories. Removing the index in such DataFrames can be slightly more complex.
🌐
sqlpey
sqlpey.com › python › methods-to-remove-index-name-in-pandas
Top 5 Methods to Remove Index Name in Pandas - sqlpey
December 5, 2024 - Another way to remove the index name is by directly assigning None to df.index.name. ... From Pandas version 0.18.0, rename_axis can modify the DataFrame in place.
🌐
Delft Stack
delftstack.com › home › howto › python pandas › pandas remove index
How to Remove Pandas DataFrame Index | Delft Stack
February 5, 2025 - The pandas.DataFrame.reset_index() method will reset the index of the DataFrame to the default index.
🌐
Spark By {Examples}
sparkbyexamples.com › home › pandas › pandas drop index column explained
Pandas Drop Index Column Explained - Spark By {Examples}
July 3, 2025 - How to drop the index from Pandas DataFrame? Pandas DataFrames and Pandas Series always have an index, when not specified index while
🌐
YouTube
youtube.com › codetime
pandas dataframe remove column index name - YouTube
Download this code from https://codegive.com Title: Removing Column Index Name in Pandas DataFrame: A Step-by-Step TutorialIntroduction:Pandas is a powerful ...
Published   January 11, 2024
Views   21
🌐
Pandas
pandas.pydata.org › docs › reference › api › pandas.Index.drop.html
pandas.Index.drop — pandas 3.0.3 documentation
Make new Index with passed list of labels deleted. ... Array-like object or a scalar value, representing the labels to be removed from the Index.
🌐
Altcademy
altcademy.com › blog › how-to-get-rid-of-index-column-in-pandas
How to get rid of index column in Pandas - Altcademy.com
January 17, 2024 - When you use reset_index with the drop=True argument, Pandas will remove the index and just replace it with the default integer index. If you don't include drop=True, Pandas will add the old index as a new column in your DataFrame, which is ...
🌐
DNMTechs
dnmtechs.com › removing-index-name-in-pandas
Removing Index Name in Pandas – DNMTechs – Sharing and Storing Technology Knowledge
Another way to remove the index name is by resetting the index using the reset_index() method. This method removes the current index and replaces it with a default numbered index. Here’s an example: import pandas as pd # Create a DataFrame data = {'Name': ['John', 'Emma', 'Michael'], 'Age': ...
🌐
Pandas
pandas.pydata.org › pandas-docs › stable › reference › api › pandas.DataFrame.reset_index.html
pandas.DataFrame.reset_index — pandas 3.0.1 documentation
>>> df.reset_index(names=["classes", "names"]) classes names speed species max type 0 bird falcon 389.0 fly 1 bird parrot 24.0 fly 2 mammal lion 80.5 run 3 mammal monkey NaN jump
🌐
datagy
datagy.io › home › pandas tutorials › pandas dataframes › pandas drop a dataframe index column: guide with examples
Pandas Drop a Dataframe Index Column: Guide with Examples • datagy
September 3, 2023 - Learn how to use Pandas to drop a dataframe index column using the reset_index and set_index methods and how to read csv without an index.
🌐
Linux Hint
linuxhint.com › pandas-dataframe-remove-index
Linux Hint – Linux Hint
September 6, 2022 - Linux Hint LLC, [email protected] 1210 Kelly Park Circle, Morgan Hill, CA 95037 Privacy Policy and Terms of Use