I have the following table:
Year VTP VTT VKB VDP VCL VLX VVL VCT
2007
2008 50 54 55 56 56 56 56 55
2011 49 49 48 46 46 48 48 49
2013 44 48 47 49 48 49 50 51
2015 47 47 50 49 48 49 50 48
And I want to plot it, but before doing that, I want to make sure that all of the value in my table are numeric, so I use the following code:
df = df1.apply(pd.to_numeric, errors='coerce')
When I print it, it turns some values in the table to NaN
(please see table below, especially for year 2015).
VTP VTT VKB VDP VCL VLX VVL VCT
Year
2007 NaN NaN NaN NaN NaN NaN NaN NaN
2008 50.0 54.0 55.0 56.0 56.0 56.0 56.0 55.0
2011 49.0 49.0 48.0 46.0 46.0 48.0 48.0 49.0
2013 44.0 48.0 47.0 49.0 48.0 49.0 50.0 51.0
2015 47.0 NaN 50.0 49.0 NaN 49.0 NaN 48.0
Thus, I would like to ask why does it behave that way and how to solve it?