I have an array of years ,
por. The years are currently floats and include a decimal like 1942.0. I want to remove the decimal place and add "-12-31" so that I have an array with entries that look like "1942-12-31". I wrote the loop below but when I run it, the decimal remains and the first few instances of the array remain unchanged. Where am I going wrong?
por=CMStations.por for i in por: int(i) por.loc[i]=str(i)+"-12-31"
Source: Python Questions