digital-science / dimcli

Python client and CLI for scientometrics and research analytics using the Dimensions API.
https://digital-science.github.io/dimcli/getting-started.html
MIT License
43 stars 6 forks source link

Fixing pandas warning about using keyword args #71

Closed rabdill closed 2 years ago

rabdill commented 2 years ago

Calls to the df_concepts method can throw this warning:

/site-packages/dimcli/core/dataframe_factory.py:175: FutureWarning: In a future version of pandas all arguments of DataFrame.drop except for the argument 'labels' will be keyword-only df = df.drop(FIELD_NAME_SCORES, 1).assign(**pd.json_normalize(df[FIELD_NAME_SCORES])) # unpack dict with new columns

This changes the call to dataframe.drop to use keywords rather than argument order.

rabdill commented 2 years ago

Tests passing locally