Data Science · मराठी आवृत्ती
रवींद्र बागले यांच्या course वर आधारित · सहज मराठीत explanation
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
English मराठी हिंदी
Do not apply title case to all text. Case can matter in IDs, brand names, and codes. Here we use it only after deciding to do so for city and status.
Title case सर्व text ला लावू नका. IDs, brand names आणि codes मध्ये case महत्त्वाचा असू शकतो. इथे city/status साठी ठरवून वापरतोय.
Title case सभी text पर न लगाएँ. IDs, brand names और codes में case महत्वपूर्ण हो सकता है. यहाँ हम city/status के लिए तय करके इस्तेमाल कर रहे हैं.
मागील: 9.1 Messy sample: सुरुवातीचा data पुढील: 9.3 Types, missing values आणि duplicates