# 9.2 Rename, strip आणि standardise

Source: https://ravindrabagale.com/mr/datascience/ch09-data-cleaning-a-z-in-pandas/9-2-rename-strip-standardise.html
Language: mr (Marathi with English technical terms)

Raw data ची copy करा. Column names मधले बाहेरचे spaces काढा, lowercase करा आणि मधल्या spaces ऐवजी underscore वापरा. City आणि status मधले spaces व case देखील एकसारखे करूया.

df = raw.copy()
df.columns = (
    df.columns.str.strip().str.lower().str.replace(" ", "_")
)
df["city"] = df["city"].str.strip().str.title()
df["status"] = df["status"].str.strip().str.title()

Pune आणि pune वेगळे groups बनू नयेत म्हणून हा step उपयोगी आहे. raw मूळ स्वरूपात राहतो; बदल df मध्ये होतात.

रवींद्र बागले यांची tip

Title case सर्व text ला लावू नका. IDs, brand names आणि codes मध्ये case महत्त्वाचा असू शकतो. इथे city/status साठी ठरवून वापरतोय.
