Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas check if column is object type

for y in agg.columns:
    if(agg[y].dtype == np.float64 or agg[y].dtype == np.int64):
          treat_numeric(agg[y])
    else:
          treat_str(agg[y])
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pandas #check #column #object #type
ADD COMMENT
Topic
Name
1+5 =