human
Python code for collecting the column names in a dataframe.
assistant
Here is a Python code for collecting the column names in a dataframe

import pandas as pd

def get_column_names(df):
    """Return the column names of a dataframe."""
    return df.columns

# Enter the dataframe
df = pd.DataFrame({'age': [1, 2, 3], 'name': ['rose','bicycle','mouse']})

# Calling the function
print((get_column_names(df)))

#Example Output
# Index(['age', 'name'], dtype='object')

#Remember to inspect code for bugs.