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

FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. #140

Open
Michael-Sun opened this issue Sep 27, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@Michael-Sun
Copy link

babs-status --project-root $PWD floods my screen with FutureWarnings:

(/dartfs-hpc/rc/home/j/f003z4j/miniconda3/envs/physio/babs) [f003z4j@n09 my_BABS_project]$ babs-status --project-root $PWD
Did not request resubmit based on job states (no --resubmit).
/dartfs-hpc/rc/home/j/f003z4j/miniconda3/envs/physio/babs/lib/python3.9/site-packages/babs/babs.py:1182: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. Value 'I'm in /dartfs-hpc/rc/home/j/f003z4j/babs_demo2/my_BABS_project/analysis using /dartfs-hpc/rc/home/j/f003z4j/miniconda3/bin/python' has dtype incompatible with float64, please explicitly cast to a compatible dtype first.
df_job_updated.at[i_job, "last_line_stdout_file"] =
/dartfs-hpc/rc/home/j/f003z4j/miniconda3/envs/physio/babs/lib/python3.9/site-packages/babs/babs.py:1261: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. Value 'running' has dtype incompatible with float64, please explicitly cast to a compatible dtype first.
df_job_updated.at[i_job, "job_state_category"] = state_category
/dartfs-hpc/rc/home/j/f003z4j/miniconda3/envs/physio/babs/lib/python3.9/site-packages/babs/babs.py:1262: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. Value 'r' has dtype incompatible with float64, please explicitly cast to a compatible dtype first.
df_job_updated.at[i_job, "job_state_code"] = state_code
/dartfs-hpc/rc/home/j/f003z4j/miniconda3/envs/physio/babs/lib/python3.9/site-packages/babs/babs.py:1274: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. Value '0:19' has dtype incompatible with float64, please explicitly cast to a compatible dtype first.
df_job_updated.at[i_job, "duration"] = duration

Job status:
There are in total of 6 jobs to complete.
1 job(s) have been submitted; 5 job(s) haven't been submitted.
Among submitted jobs,
0 job(s) are successfully finished;
0 job(s) are pending;
1 job(s) are running;
0 job(s) are failed.

All log files are located in folder: /dartfs-hpc/rc/home/j/f003z4j/babs_demo2/my_BABS_project/analysis/logs

@zhao-cy
Copy link
Collaborator

zhao-cy commented Oct 5, 2023

Hi Michael! Could you please let me know which version of pandas package you're using?

@zhao-cy zhao-cy added the enhancement New feature or request label Oct 5, 2023
@zhao-cy
Copy link
Collaborator

zhao-cy commented Nov 16, 2023

Shreya from Alexander-Bloch's lab also has similar issue. Her pandas version is: 2.1.2.

@zhao-cy
Copy link
Collaborator

zhao-cy commented Dec 6, 2023

TODO: set the upper boundary of pandas package version in the settings when installing.

@asmacdo
Copy link
Collaborator

asmacdo commented Jan 12, 2024

As @yarikoptic mentioned in my duplicate issue, #168 (comment)

we probably ought not to set a max version of pandas since that will eventually limit babs compatibility.

Instead, I think we should leave the pandas requirement as-is, with the ambition to refactor for the new pandas. If pandas creates a new release that drops that functionality and breaks babs, then we can add then max version as a stop-gap.

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

No branches or pull requests

3 participants