Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion world_trade_data/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import requests
import pandas as pd
import world_trade_data.defaults
import numpy as np

logging.basicConfig()
LOGGER = logging.getLogger(__name__)
Expand Down Expand Up @@ -141,6 +142,6 @@ def _wits_data_to_df(data, value_name='Value', is_tariff=False, name_or_id='id')

for col in table:
if '_Rate' in col or 'Lines' in col or col == 'Value':
table[col] = table[col].apply(lambda s: pd.np.NaN if s == '' else float(s))
table[col] = table[col].apply(lambda s: np.NaN if s == '' else float(s))

return table