Ravindra Bagale · Data Scienceसर्व coursesया course चे lessonsशोधाEnglish

Data Science · मराठी आवृत्ती

4.2 dtype: array मध्ये कोणत्या प्रकारचा data आहे?

रवींद्र बागले यांच्या course वर आधारित · सहज मराठीत explanation

dtypeउपयोग
int64 / int32Counts आणि qty
float64Amounts आणि minutes
boolTrue/False flags
objectमिश्र प्रकार / text; numeric operations पेक्षा slow असू शकतो

Number दिसणारी value text मध्येही असू शकते. गणित करण्याआधी convert करा:

amount_txt = np.array(["64", "90", "240"])
# wrong for math — convert:
amount_num = amount_txt.astype(float)
print(amount_num.sum())