How do we select the columns which have numeric values of all the columns present in a data frame?
We can select the required columns by using the column name and then by slicing those columns from the data frame, but how do we extract those columns using the data type that is present in it
Asked
Active
Viewed 199 times
0

Debi Prasad
- 297
- 1
- 8
-
Would you please post the code that you've used to attempt to solve the problem? – rajah9 Mar 02 '22 at 13:23
1 Answers
1
let's imagine you already have a dataframe df
df
with only numerical data is
import pandas as pd
import numpy as np
df_numeric = df.select_dtypes(include=np.number)

pacdev
- 551
- 1
- 3
- 13