Let I've a dataframe df
Name Age Job
Rick 24 Worker
Max 20 Worker
Sam 48 Driver
Expected output:
Name
Job
Now, I want to print out those column(name) which has object type data.
Here, Is my attempt:
for column in df:
if df.dtypes(column) == 'object':
print(column)
But I'm getting an error which is: " if df.dtypes(column) == 'object': TypeError: 'Series' object is not callable "