Does anyone have any ideas on why I am getting the following error when I try to print out columns data types of a df using the:
print(df.types)
command
AttributeError: 'DataFrame' object has no attribute 'types'
There are no duplicate values in the column names of the df.
Thanks!
There is a small typo in your example. In order to print columns data types of a dataframe you have to write: print(df.dtypes)
Here is the corresponding documentation: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.dtypes.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With