EconML icon indicating copy to clipboard operation
EconML copied to clipboard

Strange compatibility issue with pandas

Open datasciantle opened this issue 3 years ago • 4 comments

Hello, I am finding a strange issue where pandas breaks after I import some features from econml. For instance, if I want to inspect the label column: df['label' works fine with no econml imports. But it throws an exception after importing: from econml.dml import LinearDML, CausalForestDML

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.8/site-packages/sympy/interactive/printing.py", line 27, in _displayhook print(stringify_func(arg, **settings)) File "/usr/local/lib/python3.8/site-packages/sympy/printing/printer.py", line 372, in __call__ return self.__wrapped__(*args, **kwargs) File "/usr/local/lib/python3.8/site-packages/sympy/printing/pretty/pretty.py", line 2871, in pretty return pp.doprint(expr) File "/usr/local/lib/python3.8/site-packages/sympy/printing/pretty/pretty.py", line 66, in doprint return self._print(expr).render(**self._settings) File "/usr/local/lib/python3.8/site-packages/sympy/printing/printer.py", line 331, in _print return printmethod(expr, **kwargs) File "/usr/local/lib/python3.8/site-packages/sympy/printing/pretty/pretty.py", line 999, in _print_Series args = list(expr.args) File "/usr/local/lib/python3.8/site-packages/pandas/core/generic.py", line 5487, in __getattr__ return object.__getattribute__(self, name) AttributeError: 'Series' object has no attribute 'args'

What am I missing here?

datasciantle avatar Oct 11 '22 19:10 datasciantle

That is indeed surprising. Could you include the output of pip list as well as indicate what platform you're using?

kbattocchi avatar Oct 12 '22 14:10 kbattocchi

Yes I am experiencing the same issue!

vitali-turintech avatar Nov 14 '22 14:11 vitali-turintech

@vitali-turintech Could you provide the output of pip list and the platform you're seeing this on?

kbattocchi avatar Nov 15 '22 13:11 kbattocchi

@kbattocchi I'm seeing this issue too.

uname -a
Darwin 24.5.0 Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:26 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T8112 arm64

pip list

Package Version


alembic 1.16.2 annotated-types 0.7.0 anyio 4.9.0 asttokens 3.0.0 awswrangler 3.11.0 blinker 1.9.0 boto3 1.38.44 botocore 1.38.44 cachetools 5.5.2 category_encoders 2.7.0 causal-learn 0.1.4.3 certifi 2025.6.15 cffi 1.17.1 charset-normalizer 3.4.2 clarabel 0.11.1 click 8.2.1 cloudpickle 3.1.1 contourpy 1.3.2 cvxpy 1.6.6 cycler 0.12.1 Cython 0.29.37 databricks-sdk 0.57.0 decorator 5.2.1 docker 7.1.0 dowhy 0.12 econml 0.15.1 executing 2.2.0 fastapi 0.115.13 Flask 2.3.3 fonttools 4.58.4 gitdb 4.0.12 GitPython 3.1.44 google-auth 2.40.3 graphene 3.4.3 graphql-core 3.2.6 graphql-relay 3.2.0 graphviz 0.21 gunicorn 23.0.0 h11 0.16.0 holidays 0.75 idna 3.10 importlib_metadata 8.7.0 ipython 9.3.0 ipython_pygments_lexers 1.1.1 itsdangerous 2.2.0 jedi 0.19.2 Jinja2 3.1.6 jmespath 1.0.1 joblib 1.5.1 kiwisolver 1.4.8 lightgbm 4.6.0 llvmlite 0.44.0 Mako 1.3.10 Markdown 3.8.2 MarkupSafe 3.0.2 matplotlib 3.10.3 matplotlib-inline 0.1.7 mlflow 2.22.1 mlflow-skinny 2.22.1 momentchi2 0.1.8 mpmath 1.3.0 networkx 3.5 numba 0.61.2 numpy 1.26.4 opentelemetry-api 1.34.1 opentelemetry-sdk 1.34.1 opentelemetry-semantic-conventions 0.55b1 osqp 1.0.4 packaging 24.2 pandas 2.2.3 parso 0.8.4 patsy 1.0.1 pexpect 4.9.0 pillow 11.2.1 pip 25.0 prompt_toolkit 3.0.51 protobuf 6.31.1 psycopg2-binary 2.9.10 ptyprocess 0.7.0 pure_eval 0.2.3 pyarrow 14.0.2 pyasn1 0.6.1 pyasn1_modules 0.4.2 pycparser 2.22 pydantic 2.11.7 pydantic_core 2.33.2 pydot 4.0.1 Pygments 2.19.2 pyparsing 3.2.3 python-dateutil 2.9.0.post0 pytz 2025.2 PyYAML 6.0.2 requests 2.32.4 rsa 4.9.1 s3transfer 0.13.0 scikit-learn 1.5.2 scipy 1.11.4 scs 3.2.7.post2 setuptools 80.9.0 shap 0.43.0 six 1.17.0 slicer 0.0.7 smmap 5.0.2 sniffio 1.3.1 sparse 0.17.0 SQLAlchemy 2.0.41 sqlparse 0.5.3 stack-data 0.6.3 starlette 0.46.2 statsmodels 0.14.4 sympy 1.14.0 threadpoolctl 3.6.0 tqdm 4.67.1 traitlets 5.14.3 typing_extensions 4.14.0 typing-inspection 0.4.1 tzdata 2025.2 urllib3 2.5.0 uvicorn 0.34.3 wcwidth 0.2.13 Werkzeug 3.1.3 zipp 3.23.0

ewestern avatar Jun 28 '25 15:06 ewestern