manipulation#

class jsonpolars.dfop.manipulation.Select(type: str = 'select', exprs: ~typing.List[IntoExpr] = <factory>, named_exprs: ~typing.Dict[str, IntoExpr] = <factory>)[source]#

Ref: https://docs.pola.rs/api/python/stable/reference/dataframe/api/polars.DataFrame.select.html

classmethod from_dict(dct: Dict[str, Any])[source]#

Construct an instance from dataclass-like data. It could be a dictionary, an instance of this class, or None.

class jsonpolars.dfop.manipulation.Rename(type: str = 'rename', mapping: Union[Dict[str, str], Callable[[str], str]] = Sentinel('REQUIRED'))[source]#

Ref: https://docs.pola.rs/api/python/stable/reference/dataframe/api/polars.DataFrame.rename.html

classmethod from_dict(dct: Dict[str, Any])[source]#

Construct an instance from dataclass-like data. It could be a dictionary, an instance of this class, or None.

class jsonpolars.dfop.manipulation.Drop(type: str = 'drop', columns: List[ColumnNameOrSelector] = Sentinel('REQUIRED'), strict: bool = True)[source]#

Ref: https://docs.pola.rs/api/python/stable/reference/dataframe/api/polars.DataFrame.drop.html

classmethod from_dict(dct: Dict[str, Any])[source]#

Construct an instance from dataclass-like data. It could be a dictionary, an instance of this class, or None.

class jsonpolars.dfop.manipulation.WithColumns(type: str = 'with_columns', exprs: ~typing.List[IntoExpr] = <factory>, named_exprs: ~typing.Dict[str, IntoExpr] = <factory>)[source]#

Ref: https://docs.pola.rs/api/python/stable/reference/dataframe/api/polars.DataFrame.with_columns.html

classmethod from_dict(dct: Dict[str, Any])[source]#

Construct an instance from dataclass-like data. It could be a dictionary, an instance of this class, or None.

class jsonpolars.dfop.manipulation.Head(type: str = 'head', n: int = 5)[source]#

Ref: https://docs.pola.rs/api/python/stable/reference/dataframe/api/polars.DataFrame.head.html

classmethod from_dict(dct: Dict[str, Any])[source]#

Construct an instance from dataclass-like data. It could be a dictionary, an instance of this class, or None.

class jsonpolars.dfop.manipulation.Tail(type: str = 'tail', n: int = 5)[source]#

Ref: https://docs.pola.rs/api/python/stable/reference/dataframe/api/polars.DataFrame.tail.html

classmethod from_dict(dct: Dict[str, Any])[source]#

Construct an instance from dataclass-like data. It could be a dictionary, an instance of this class, or None.

class jsonpolars.dfop.manipulation.Sort(type: str = 'sort', by: List[IntoExpr] = Sentinel('REQUIRED'), descending: Union[bool, List[bool]] = False, nulls_last: Union[bool, List[bool]] = False, multithreaded: bool = True, maintain_order: bool = False)[source]#

Ref: https://docs.pola.rs/api/python/stable/reference/dataframe/api/polars.DataFrame.sort.html

classmethod from_dict(dct: Dict[str, Any])[source]#

Construct an instance from dataclass-like data. It could be a dictionary, an instance of this class, or None.

class jsonpolars.dfop.manipulation.DropNulls(type: str = 'drop_nulls', subset: List[ColumnNameOrSelector] = None)[source]#

Ref: https://docs.pola.rs/api/python/stable/reference/dataframe/api/polars.DataFrame.drop_nulls.html

classmethod from_dict(dct: Dict[str, Any])[source]#

Construct an instance from dataclass-like data. It could be a dictionary, an instance of this class, or None.