Skip to content

Instantly share code, notes, and snippets.

@srang992
Created April 12, 2023 15:26
Show Gist options
  • Save srang992/c849503fcc1fd009061fa58942a6e91b to your computer and use it in GitHub Desktop.
Save srang992/c849503fcc1fd009061fa58942a6e91b to your computer and use it in GitHub Desktop.
# converting the column's datatype to 'object'
choco_data['reference_no'] = choco_data['reference_no'].astype('object')
choco_data['review_date'] = choco_data['review_date'].astype('object')
# selecting the object(or you can say string) type columns
choco_data_cat = choco_data.select_dtypes(include=['object'])
# showing the summary statistics
choco_data_cat.describe()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment