79133706

Date: 2024-10-28 14:01:15
Score: 1
Natty:
Report link

Convert each object column to categorical

df = df.apply(lambda col: col.astype('category') if col.dtypes == 'object' else col)
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Cristobal