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?
>>> 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With