Skip to content

Commit

Permalink
add comment about FLS200_SN converted to NaN
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenholleran committed Nov 9, 2023
1 parent 44f3d52 commit b836d8c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@
"source": [
"Normally loading a csv into the brightwind library would be as simple as `bw.load_csv('filename.csv')`. However, due to poor formatting of the timeseries data file downloaded directly from the above link there are few extra things to do to read this in properly.\n",
"1. `engine='python'` is added due to the 3 leading character spaces before the 'NaN' values, Pandas throws an error as it thinks there are multiple data types, strings and numeric in the one column.\n",
"1. Also, due to this we need to force this to a numeric by using `.apply(pd.to_numeric, errors='coerce')`\n",
"1. Also, due to this we need to force this to a numeric by using `.apply(pd.to_numeric, errors='coerce')`. Unfortunately this also converts the column 'FLS200_S/N', which is the buoy's serial number, to be NaN. For this example this is acceptable as the serial number is not used.\n",
"1. Finally, the column names for some reason have a leading space which needs to be stripped out using `data.columns.str.strip()`. \n",
"\n",
"Thanks to Daniel Nuno of Eolos for solving these issues."
Expand Down

0 comments on commit b836d8c

Please sign in to comment.