I'm not sure if this is the right place to put this.
So I have a dataframe consisting of just 4 columns but around 2000 rows. It's in a csv format. A typical value of the first column which is titled month actually looks like so: 1;1990-01-02;1990;1;23 So it seems that 1 is the index, then we have the year, month, and day. The two other numbers don't make sense and I think I can throw them out. I want to clean up this column and put it into some date format because the 4th column contains precipitation information (with many NaN's)that I want to look into. I'd like to get the maximum temperature over every month.
Here's what I started out by doing
I then want to just get the 1st index of that list by doing
df["MONTH"]=df["MONTH"].map(lambda x: x[1]) but I get an error saying
AttributeError: 'list' object has no attribute 'split' The next step would have been to do something like
df["MONTH"]=pd.to_datetime[df["MONTH"]] How do I fix my error (or is there a better way of doing it?) and then get the max PRCP for January of 1990, February of 1990, ..., November of 2020 (some dates of some months are missing)
