0

name of file is df

df.dtypes

output :

tx_price                int64

beds                    int64

baths                   int64

lot_size                int64

property_type          object

exterior_walls         object

roof                   object

basement              float64

restaurants             int64

groceries               int64

nightlife               int64

how do I filter df.dtypes using boolean mask such that I get the below output?

desired output:

property_type     object

exterior_walls    object

roof              object

dtype: object
yomi
  • 31
  • 4
  • Warm welcome to SO. Please try to use correct upper case letters, e.g. in the beginning of your title, sentences or the word "I". This would be gentle to your readers. Please read https://stackoverflow.com/help/how-to-ask and https://stackoverflow.com/help/minimal-reproducible-example. Then update your question with code to show us what you have tried so far. – buhtz Aug 13 '22 at 19:37

1 Answers1

0

you can use select_dtypes() function
pleas read this link and this document

Galaxy
  • 172
  • 9