Describe the bug
Station names containing spaces (e.g. "Port Louis", "Ko Lak") caused location parsing to fail or return wrong names. Multi-word names split into multiple tokens when parsed with the default C engine, causing row corruption or skipped entries.
Root cause
pd.read_csv with the C engine aborts when whitespace-delimited rows have more tokens than the column name list. Station names with spaces produced extra tokens, breaking the parser.
Fix
Switched to engine='python' with on_bad_lines='skip' to handle multi-word station names correctly.
Fixed in
Commit d4993cb
Describe the bug
Station names containing spaces (e.g. "Port Louis", "Ko Lak") caused location parsing to fail or return wrong names. Multi-word names split into multiple tokens when parsed with the default C engine, causing row corruption or skipped entries.
Root cause
pd.read_csvwith the C engine aborts when whitespace-delimited rows have more tokens than the column name list. Station names with spaces produced extra tokens, breaking the parser.Fix
Switched to
engine='python'withon_bad_lines='skip'to handle multi-word station names correctly.Fixed in
Commit d4993cb