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

[BUG] <FutureWarning: errors='ignore' > #385

Closed
2 tasks done
raimondskrauklis opened this issue May 14, 2024 · 3 comments
Closed
2 tasks done

[BUG] <FutureWarning: errors='ignore' > #385

raimondskrauklis opened this issue May 14, 2024 · 3 comments

Comments

@raimondskrauklis
Copy link

Summary

Getting future warning about deprecated functionality

Did you read the FAQ?

  • I have read the FAQ

Did you search GitHub Discussions?

  • I have searched the discussions

(Optional) PDF URL

No response

About your environment

Python version:
    3.10.2 (tags/v3.10.2:a58ebcc, Jan 17 2022, 14:12:15) [MSC v.1929 64 bit (AMD64)]
Java version:
    java version "22.0.1" 2024-04-16
Java(TM) SE Runtime Environment (build 22.0.1+8-16)
Java HotSpot(TM) 64-Bit Server VM (build 22.0.1+8-16, mixed mode, sharing)
tabula-py version: 2.9.0
platform: Windows-10-10.0.22621-SP0
uname:
    uname_result(system='Windows', node='DESKTOP-0ATBQ2G', release='10', version='10.0.22621',

What did you do when you faced the problem?

'tabula-py' is working great, but getting future warning:
lib\site-packages\tabula\io.py:1045: FutureWarning: errors='ignore' is deprecated and will raise in a future version. Use to_numeric without passing errors and catch exceptions explicitly instead
df[c] = pd.to_numeric(df[c], errors="ignore")

Code

def remove_unnamed_columns(df):
# Remove 'Unnamed: 0' and 'Unnamed: 1' columns if they exist
df = df.drop(columns=['Unnamed: 0', 'Unnamed: 1'], errors='ignore')
return df

Expected behavior

Keep code running when Pandas deprecate "errors='ignore' " .

Actual behavior

Getting error:
errors='ignore' is deprecated and will raise in a future version. Use to_numeric without passing errors and catch exceptions explicitly instead

Related issues

No response

@chezou
Copy link
Owner

chezou commented May 14, 2024

Duplicated #379
It's not an error, but a warning.

I will release 2.9.1 to PyPI once I fix the deployment GH Actions. Meanwhile, please try the master branch.

@chezou chezou closed this as completed May 14, 2024
@chezou chezou added duplicate and removed bug labels May 14, 2024
@chezou
Copy link
Owner

chezou commented May 14, 2024

@raimondskrauklis
Copy link
Author

Thank You, no more 'FutureWarning'

@chezou chezou removed the triage label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants