Jul-21-2019, 11:05 PM
(Jul-21-2019, 04:28 AM)ift38375 Wrote: df = pd.DataFrame(diSales, dtype=pd.Int32Dtype()).why ? What is use of this line ?This is about new Pandas feature, see docs here.
if you call
df.info()
, you find that the data frame is of integer type; Nevertheless, .mad
method, along with .mean
method, still automatically convert it to a float type. So, the result of .mad
execution has <float> type.