Skip to content

BUG: ImportError: cannot import name 'NaN' from 'numpy' #61415

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

Closed
3 tasks done
Bl4ckVo1d opened this issue May 9, 2025 · 3 comments
Closed
3 tasks done

BUG: ImportError: cannot import name 'NaN' from 'numpy' #61415

Bl4ckVo1d opened this issue May 9, 2025 · 3 comments
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member

Comments

@Bl4ckVo1d
Copy link

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

ImportError: cannot import name 'NaN' from 'numpy'

Issue Description

ImportError: cannot import name 'NaN' from 'numpy'

Expected Behavior

ImportError: cannot import name 'NaN' from 'numpy'

Installed Versions

ImportError: cannot import name 'NaN' from 'numpy'

@Bl4ckVo1d Bl4ckVo1d added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels May 9, 2025
@Bl4ckVo1d
Copy link
Author

ImportError: cannot import name 'NaN' from 'numpy'

1 similar comment
@Bl4ckVo1d
Copy link
Author

ImportError: cannot import name 'NaN' from 'numpy'

@arthurlw
Copy link
Member

arthurlw commented May 9, 2025

Hey OP, thanks for raising this issue! Just a heads up, NaN is not a directly importable attribute from numpy. You can use np.nan instead:

import numpy as np
print(np.nan)

or

from numpy import nan
print(nan)

This isn’t a bug, so I’ll close this. If you’re still running into issues, feel free to reopen or provide more context.

@arthurlw arthurlw closed this as completed May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member
Projects
None yet
Development

No branches or pull requests

2 participants