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

Replace deprecated delim_whitespace parameter to sep='\s+' in pd.read_csv #2932

Merged
merged 1 commit into from
Dec 29, 2023

Conversation

seisman
Copy link
Member

@seisman seisman commented Dec 29, 2023

pd.read_csv's delim_whitespace parameter will be deprecated in pandas v2.2.0. sep="\s+" is recommended instead. See https://pandas.pydata.org/docs/dev/reference/api/pandas.read_csv.html

This PR fixes the warnings in the "GMT Dev Tests" workflow (https://github.com/GenericMappingTools/pygmt/actions/runs/7349827937/job/20010428424?pr=2931):

  /home/runner/work/pygmt/pygmt/pygmt/tests/test_contour.py:21: FutureWarning: The 'delim_whitespace' keyword in pd.read_table is deprecated and will be removed in a future version. Use ``sep='\s+'`` instead
    return pd.read_table(POINTS_DATA, header=None, delim_whitespace=True)

@seisman seisman changed the title Replace deprecated delim_whitespace parameter to sep='\s+' Replace deprecated delim_whitespace parameter to sep='\s+' in pd.read_csv Dec 29, 2023
@seisman seisman added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog needs review This PR has higher priority and needs review. labels Dec 29, 2023
@seisman seisman added this to the 0.11.0 milestone Dec 29, 2023
@seisman seisman marked this pull request as draft December 29, 2023 08:45
@seisman seisman marked this pull request as ready for review December 29, 2023 08:45
Copy link

codspeed-hq bot commented Dec 29, 2023

CodSpeed Performance Report

Merging #2932 will improve performances by 8.67%

⚠️ No base runs were found

Falling back to comparing pd/read_csv (251a30f) with main (6ed1aa2)

Summary

⚡ 1 improvements
✅ 63 untouched benchmarks

Benchmarks breakdown

Benchmark main pd/read_csv Change
test_grdlandmask_no_outgrid 2.5 s 2.3 s +8.67%

@seisman seisman removed the needs review This PR has higher priority and needs review. label Dec 29, 2023
@seisman seisman merged commit 21a8722 into main Dec 29, 2023
17 of 30 checks passed
@seisman seisman deleted the pd/read_csv branch December 29, 2023 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants