Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YAMLLoadWarning on import #97

Closed
soliverc opened this issue Jan 15, 2020 · 4 comments
Closed

YAMLLoadWarning on import #97

soliverc opened this issue Jan 15, 2020 · 4 comments

Comments

@soliverc
Copy link

My first two lines in a Jupyter notebook:

import pandas as pd
import swifter

I get the error:

C:\Users\seanc\Anaconda3\lib\site-packages\dask\config.py:168: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  data = yaml.load(f.read()) or {}

Something has been deprecated but I'm not sure what and I don't know how to fix it. Is this a big deal or will it cause problems?

@soliverc
Copy link
Author

Also another warning when I tested it using apply:

df['fixed_name'] = df['term_location'].swifter.apply(shop_name_fixer)

C:\Users\seanc\Anaconda3\lib\site-packages\tqdm\std.py:651: FutureWarning: The Panel class is removed from pandas. Accessing it from the top-level namespace will also be removed in the next version
  from pandas import Panel

It still works though, it's currently applying the function.

@jmcarpenter2
Copy link
Owner

Hi @soliverc,

Thanks for raising this issue. Those warnings appear to be coming from the underlying libraries dask and tqdm. Can you please let us know what version of each library you are using? Specifically, I am interested knowing what version you are using for the following four libraries:

  • pandas
  • dask
  • tqdm
  • swifter

Thanks,
Jason

@soliverc
Copy link
Author

Pandas 0.25.0
Dask 1.1.4
tqdm 4.38.0
Swifter 0.297

@jmcarpenter2
Copy link
Owner

jmcarpenter2 commented Jan 29, 2020

Hi @soliverc ,

Sorry for the delay! I did some digging to uncover where these warnings are coming from.

With regards to the first issue. This dask issue noted the deprecated yaml load, and this PR resolved it back in March, 2019. Please upgrade to dask>=1.26.1 to resolve the yaml warning.

With regards to the second issue, it appears that this was flagged in this tqdm issue and resolved by this PR back in October, 2019. However, that PR was merged on October 31, 2019, the day tqdm==4.37.0 was released. Since your version (4.38.0) is after that one, I am not sure why this warning is still appearing. Regardless, this is an issue upstream with tqdm and as such not one I can solve.

Thanks,
Jason

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants