What is the diffrence between (float)&(integar) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is the diffrence between (float)&(integar)

27th Mar 2019, 7:29 AM
Ahmed M. Tohamy
Ahmed M. Tohamy - avatar
2 Answers
+ 2
Float is a single precision (32 bit) floating point data type.... Integer should I say are just numbers.. Here's an example..... Float = 2.8 Integer = 2
27th Mar 2019, 7:37 AM
Jella
Jella - avatar
0
Integers are whole numbers & float are decimal with fractional numbers. You should be careful while using it for some operations. For example: if you have to subset your data by year, then df[df['year'] = 2019], if your data type for year is float it will not work, in that case you have to give as 2019.0
27th Mar 2019, 8:42 AM
Bishu Giri
Bishu Giri - avatar