Skip to content

Commit

Permalink
handling missing data
Browse files Browse the repository at this point in the history
  • Loading branch information
alpha-xone committed Jan 13, 2020
1 parent 0c2df85 commit 048320f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions xbbg/blp.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def bdp(tickers, flds, **kwargs) -> pd.DataFrame:
.transpose()
.reindex(columns=flds)
.dropna(how='all', axis=1)
.dropna(how='all')
.pipe(pipeline.format_raw)
.pipe(pipeline.standard_cols, col_maps=col_maps)
)
Expand Down Expand Up @@ -142,8 +143,8 @@ def bdh(
res = pd.DataFrame(process.receive_events(process.process_hist))
if res.empty: return pd.DataFrame()
return pd.DataFrame(pd.concat([
r.apply(pd.Series) for _, r in res.iterrows()
], axis=1))
r.dropna().apply(pd.Series) for _, r in res.iterrows()
], axis=1, sort=True))


def bdib(
Expand Down

0 comments on commit 048320f

Please sign in to comment.