pandas_dataclasses.core.typing module#

class DataClass(*args: ~typing.~PAny, **kwargs: ~typing.~PAny)[source]#

Bases: Protocol[PAny]

Protocol for any dataclass object.

Parameters:
  • args (~PAny)

  • kwargs (~PAny)

class DataClassOf(*args: ~typing.~PAny, **kwargs: ~typing.~PAny)[source]#

Bases: Protocol[TPandas, PAny]

Protocol for any dataclass object with a factory.

Parameters:
  • args (~PAny)

  • kwargs (~PAny)

HashDict#

Type hint for dictionary of hashable keys and values.

alias of dict[Hashable, Hashable]

Pandas#

Type hint for any pandas object.

alias of DataFrame | Series[Any]

PAny = ~PAny#

Parameter specification variable for any function.

class TAny#

Type variable for any class.

alias of TypeVar(‘TAny’)

class TFrame#

Type variable for pandas DataFrame.

alias of TypeVar(‘TFrame’, bound=DataFrame)

class TPandas#

Type variable for any class of pandas object.

alias of TypeVar(‘TPandas’, bound=DataFrame | Series[Any])

class TSeries#

Type variable for pandas Series (of any dtype).

alias of TypeVar(‘TSeries’, bound=Series[Any])

is_union(tp: Any) bool[source]#

Check if a type hint is a union of types.

Parameters:

tp (Any)

Return type:

bool