What does 0. mean in Python?

Viewed 274

I am a beginner python user. Can someone explain what does this code means?

harvest["year"] = harvest.index.year
harvest["DM"] = harvest["N"] = 0.

harvest, year, DM and N are data and data variables. What does 0. mean here?

1 Answers
>>> type(0)
<class 'int'>
>>> type(0.)
<class 'float'>

It just ensures that the result, while still being "zero", is a float instead of an int.

Related