usse/scrape/venv/lib/python3.10/site-packages/pandas/tests/interchange/conftest.py
2023-12-22 15:26:01 +01:00

13 lines
227 B
Python

import pytest
import pandas as pd
@pytest.fixture
def df_from_dict():
def maker(dct, is_categorical=False):
df = pd.DataFrame(dct)
return df.astype("category") if is_categorical else df
return maker