Answers for "Data type based on rows"

0

Data type based on rows

df['datatype'] = df['column'].apply(lambda x: 'int' if type(x) == int else 'str')
Posted by: Guest on April-04-2022

Code answers related to "Data type based on rows"

Python Answers by Framework

Browse Popular Code Answers by Language