I have a pandas DataFrame that looks like this:
sum
1948 NaN
1949 NaN
1950 5
1951 3
1952 NaN
1953 4
1954 8
1955 NaN
and I would like to disable NaNat the beginning and at the end ONLY (i.e. only the values will remain, including NaNfrom 1950 to 1954). I already tried .isnull()and dropna(), but somehow I could not find the right solution. Can anyone help?
source
share