Preview:
#binning
cut_bins = np.linspace(df["km_driven"].min()-1, df["km_driven"].max()+1,10)
df["km_driven_cat"] = pd.cut(df["km_driven"], bins = cut_bins, labels=range(9))
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter