diff --git a/coinmetrics/_data_collection.py b/coinmetrics/_data_collection.py index 54f811d..bca17d2 100644 --- a/coinmetrics/_data_collection.py +++ b/coinmetrics/_data_collection.py @@ -30,6 +30,7 @@ from coinmetrics._exceptions import CoinMetricsClientNotFoundError if TYPE_CHECKING: from coinmetrics.api_client import CoinMetricsClient +import numpy as np orjson_found = True try: @@ -285,6 +286,8 @@ def to_dataframe( ) if dtype_mapper is None: df = df.convert_dtypes() + if df.dtypes.get("coin_metrics_id") == np.dtype("object"): + df["coin_metrics_id"] = df["coin_metrics_id"].astype(np.float128) if header is not None: assert len(df.columns) == len( header