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

Source: https://ravindrabagale.com/mr/datascience/ch04-numpy-essentials/4-2-dtypes.html
Language: mr (Marathi with English technical terms)

| dtype | उपयोग

 | int64 / int32 | Counts आणि qty

 | float64 | Amounts आणि minutes

 | bool | True/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())

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

CSV मधून amount string म्हणून आली तर sum चुकीचा दिसू शकतो किंवा error येऊ शकतो. NumPy चा dtype समजला की pandas मधलं astype आणि to_numeric समजायला सोपं जातं.
