get columns by type pandas

df['DataFrame Column'].dtypes

Here is what the above code is Doing:
1. We’re creating a new DataFrame called df_subset.
2. We’re using the .loc[] method to select the rows and columns we want.
3. We’re selecting the rows with an index of 1, 2, or 3, and the columns with a label of ‘DataFrame Column’.
4. We’re assigning the resulting DataFrame to the variable df_subset.
5. We’re using the .dtypes attribute to return the data types of the columns in df_subset.