titanite.config
#
Module Contents#
Classes#
Data#
API#
- titanite.config.NUMERICAL_HEADERS: list[str]#
[‘q10’, ‘q13’, ‘q15_polarity’, ‘q15_subjectivity’, ‘q16_polarity’, ‘q16_subjectivity’, ‘q18_polarity…
- titanite.config.CATEGORICAL_HEADERS: list[str]#
[‘q01’, ‘q02’, ‘q03_regional’, ‘q03_subregional’, ‘q04_regional’, ‘q04_subregional’, ‘q05’, ‘q06’, ‘…
- class titanite.config.Config(/, **data: typing.Any)#
Bases:
pydantic.BaseModel
- load_from: str#
‘config.toml’
- config: dict#
None
- categories: dict#
None
- options: dict#
None
- names: list#
[]
- titles: dict#
None
- descriptions: dict#
None
- category_maps: dict#
None
- categorical_headers: list#
[]
- numerical_headers: list#
[]
- comment_headers: list#
[]
- load()#
- load_toml() dict #
- load_config() dict #
- categorical()#
- load_categories()#
- load_options()#
- get_option(name: str)#
Get values of options as dict
- get_names() list[str] #
- get_titles() dict[str, str] #
- get_descriptions() dict[str, str] #
- get_category_maps() dict[str, str] #
- get_headers(type: str) list[str] #
- get_categorical_headers() list[str] #
- get_numerical_headers() list[str] #
- get_comment_headers() list[str] #
- get_roundrobin_headers(columns: list)#
総当たりしたいカラム名
- get_crosstab_headers(x: list[str], y: list[str]) list #
クロス集計のカラム名
x と y の二つの文字列リストを引数として受け取り、 x の各要素と y の各要素のすべての組み合わせを生成します。
ただし、y のリストからは以下の要素を除外しています。
クロス集計から除外したいカラム名
x の値(自分自身とクロス集計できないため)
Parameters
x : list[str] とくにフォーカスしたい集計カラム名 y : list[str] クロス集計結果に含まれるすべてのカラム名
Returns
type 集計するカラム名のリスト
- show()#
Print configuration
- class titanite.config.Data(/, **data: typing.Any)#
Bases:
pydantic.BaseModel
- read_from: str | pathlib.Path#
None
- load_from: str#
‘config.toml’
- config()#
- read()#
- crosstab_headers(x: list[str], y: list[str])#
- matches(columns: list)#
総当たりしたいカラム名
- headers(x: list[str], y: list[str]) list #
クロス集計のカラム名
x と y の二つの文字列リストを引数として受け取り、 x の各要素と y の各要素のすべての組み合わせを生成します。
ただし、y のリストからは以下の要素を除外しています。
クロス集計から除外したいカラム名
x の値(自分自身とクロス集計できないため)
Parameters
x : list[str] とくにフォーカスしたい集計カラム名 y : list[str] クロス集計結果に含まれるすべてのカラム名
Returns
type 集計するカラム名のリスト