Inzynierka_Gwiazdy/machine_learning/Lib/site-packages/pandas/tests/interchange/conftest.py

13 lines
227 B
Python
Raw Normal View History

2023-09-20 19:46:58 +02:00
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