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

clickhouse_connect doesn't work with pandas 2.1.0 #234

Closed
cpcloud opened this issue Aug 30, 2023 · 1 comment · Fixed by #235
Closed

clickhouse_connect doesn't work with pandas 2.1.0 #234

cpcloud opened this issue Aug 30, 2023 · 1 comment · Fixed by #235
Labels
bug Something isn't working

Comments

@cpcloud
Copy link

cpcloud commented Aug 30, 2023

Describe the bug

insert_df fails with pandas 2.1.0 (I realize it just came out today) due to use of a removed (and I guess internal (?)) API.

Steps to reproduce

In [1]: import pandas as pd

In [2]: import clickhouse_connect as cc

In [3]: client = cc.get_client()

In [4]: client.raw_query("create temporary table t (a Nullable(Timestamp))")
Out[4]: b''

In [5]: client.insert_df("t", pd.DataFrame({"a": [pd.Timestamp("now")]}))
  ...
AttributeError: module 'pandas.core.dtypes.common' has no attribute 'is_datetime_or_timedelta_dtype'

Expected behaviour

I can insert a dataframe with timestamp columns

Configuration

Environment

  • clickhouse-connect version: 0.6.10
  • Python version: 3.10.12
  • Operating system: Linux

ClickHouse server

  • ClickHouse Server version: 23.7.5.30
  • ClickHouse Server non-default settings, if any: None that I am aware of
  • CREATE TABLE statements for tables involved: See steps to reproduce
@genzgd
Copy link
Collaborator

genzgd commented Aug 30, 2023

Thanks for the report. Our daily CI tests failed today as well so I'm actually in the middle of a fix :)

@genzgd genzgd linked a pull request Aug 30, 2023 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants