-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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: NameError: name 'pa' is not defined despite pyarrow
is installed
#60573
Comments
Seems related to #57928. |
Thanks for the report, cannot reproduce on main nor 2.2.x. Just prior to the import sys
print([e for e in sys.modules if "pyarrow" in e]) what is the output that you get? |
import sys
print([e for e in sys.modules if "pyarrow" in e])
## ['pandas.compat.pyarrow', 'pyarrow._generated_version', 'pyarrow.util', 'pyarrow.lib', 'pyarrow.ipc', 'pyarrow.types', 'pyarrow'] It's also worth noting that this issue is replicated on two different machines (locally as above; and AWS Sagemaker notebook). More info conda create -n "foo" python=3.12
source activate base
source activate foo
conda install jupyterlab pandas seaborn matplotlib pyarrow 👆🏻And working inside However conda create -n "bar" python=3.12
source activate base
source activate bar
conda install jupyterlab pandas=2.2.2 seaborn matplotlib pyarrow=17.0.0 |
Hey @rhshadrach – just checking in. Have you tried replicating the bug using the virtual envs I showed in my last comment? |
@emmansh - no, and I don't have the bandwidth to work on this issue any further. |
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
Issue Description
Cannot change a column type to
float64[pyarrow]
. The error I get is:Expected Behavior
I'd expect to get the column converted properly
Installed Versions
INSTALLED VERSIONS
commit : 0691c5c
python : 3.12.8
python-bits : 64
OS : Darwin
OS-release : 24.1.0
Version : Darwin Kernel Version 24.1.0: Thu Oct 10 21:02:45 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T8112
machine : arm64
processor : arm
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.UTF-8
pandas : 2.2.3
numpy : 1.26.4
pytz : 2024.1
dateutil : 2.9.0.post0
pip : 24.2
Cython : None
sphinx : None
IPython : 8.27.0
adbc-driver-postgresql: None
adbc-driver-sqlite : None
bs4 : 4.12.3
blosc : None
bottleneck : 1.4.2
dataframe-api-compat : None
fastparquet : None
fsspec : None
html5lib : None
hypothesis : None
gcsfs : None
jinja2 : 3.1.4
lxml.etree : None
matplotlib : 3.9.2
numba : None
numexpr : 2.10.1
odfpy : None
openpyxl : None
pandas_gbq : None
psycopg2 : None
pymysql : None
pyarrow : 17.0.0
pyreadstat : None
pytest : None
python-calamine : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlsxwriter : None
zstandard : None
tzdata : 2023.3
qtpy : None
pyqt5 : None
The text was updated successfully, but these errors were encountered: