Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pola-rs
GitHub Repository: pola-rs/polars
Path: blob/main/py-polars/tests/unit/sql/conftest.py
7884 views
1
from __future__ import annotations
2
3
from pathlib import Path
4
5
import pytest
6
7
import polars as pl
8
9
10
@pytest.fixture
11
def io_files_path() -> Path:
12
return Path(__file__).parent.parent / "io" / "files"
13
14
15
@pytest.fixture
16
def df_distinct() -> pl.DataFrame:
17
return pl.DataFrame(
18
{
19
"category": ["A", "A", "B", "B", "B", "C", "C", None, None, "A"],
20
"subcategory": ["x", "x", "y", "y", "z", "x", "y", "x", "y", "x"],
21
"value": [100, 100, 200, 200, 300, 400, 500, 600, 700, 100],
22
"status": [
23
"active",
24
"active",
25
"active",
26
"inactive",
27
"active",
28
"inactive",
29
"active",
30
"active",
31
"inactive",
32
"active",
33
],
34
"score": [10, 20, 30, 30, 40, 50, 60, 70, 80, 10],
35
}
36
)
37
38