human
Can you show me a Python code to get column names of df in pandas.
assistant
Here is a Python code to get column names of df in pandas

import pandas as pd

def get_columns(df):
    """Returns the column names of the DataFrame."""
    return df.columns

# Enter the DataFrame
df = pd.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6]})

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

#Example Output
# Index(['a', 'b'], dtype='object')

#Remember to inspect code for bugs.