human
What is a good Python function to data type of columns.
assistant
Here is a Python function to type of columns

import pandas as pd

def get_data_type(df):
    """
    >>> df = pd.DataFrame({'a': [1, 2, 3], 'b': ['a', 'b', 'c']})
    >>> get_data_type(df)
    {'a': 'int64', 'b': 'object'}
    """
    return {col: df[col].dtypes.name for col in df.columns}

# Enter the dataframe
df = pd.DataFrame({'a': [1, 2, 3], 'b': ['a', 'b', 'c']})

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

#Example Output
# {'a': 'int64', 'b': 'object'}

#Remember to inspect code for bugs.