ComponentKeys
TimeSeriesおよびEventSeriesオプションで,成分のキーを指定する.
詳細
- ComponentKeysは,通常,時系列または事象系列のデータ成分に命名するために使われる.
- 次は,ComponentKeysの可能な設定である.
-
Automatic データから成分キーを自動的に選択する » None 単純な時系列あるいは事象系列を返す » {com1,com2,…} 成分 comiを持つ時系列あるいは事象系列を返す » - TimeSeries[vals,times,keys]はTimeSeries[vals,times,ComponentKeyskeys]に等しい.
例題
すべて開く すべて閉じる例 (2)
TimeSeries[{{.1, "cat"}, {.2, "dog"}, {.3, "fox"}}, {{Yesterday, Today, Tomorrow}}, ComponentKeys -> {"a", "b"}]Tabularへの変換を使ってデータを表示する:
Tabular[%]EventSeries[{{DateObject[{2026, 1, 3, 4, 2, 54.5329}, "Instant", "Gregorian", -6.], DateObject[{2026, 1, 18, 13, 51, 58.9335}, "Instant", "Gregorian", -6.]}, {DateObject[{2026, 2, 1, 16, 9, 14.7054}, "Instant", "Gregorian", -6.], DateObject[{2026, 2, 17, 6, 1, 9.07329}, "Instant", "Gregorian", -6.]}, {DateObject[{2026, 3, 3, 5, 37, 53.7335}, "Instant", "Gregorian", -6.], DateObject[{2026, 3, 18, 19, 23, 28.7273}, "Instant", "Gregorian", -6.]}}, {DateObject[{2026, 1}], Automatic, "Month"}, ComponentKeys -> {"FullMoon", "NewMoon"}]Tabularへの変換を使ってデータを表示する:
Tabular[%]スコープ (6)
TimeSeries[{{.1, "cat"}, {.2, "dog"}, {.3, "fox"}}, {{Yesterday, Today, Tomorrow}}, ComponentKeys -> {"a", "b"}]Tabularへの変換を使ってデータを示す:
Tabular[%]与えられたリストが不完全な時は,自動的に成分キーが加えられる:
TimeSeries[{{.1, "cat"}, {.2, "dog"}, {.3, "fox"}}, {{Yesterday, Today, Tomorrow}}, ComponentKeys -> {"number"}]ColumnKeys[%]TimeSeries[{{.1, "cat"}, {.2, "dog"}, {.3, "fox"}}, {{Yesterday, Today, Tomorrow}}, ComponentKeys -> {}]ColumnKeys[%]ComponentKeysのAutomatic設定は入力キーを保存する:
Tabular[{{.1, "cat"}, {.2, "dog"}, {.3, "fox"}}, {"K1", "K2"}]tab = Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["K1" -> Association["ElementType" -> "Real64"],
"K2" -> Association["ElementType" -> "String"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0.1, 0.2, 0.3}, {}, None},
"ElementType" -> "Real64"]], TabularColumn[Association[
"Data" -> {{3, {0, 3, 6, 9}, "catdogfox"}, {}, None}, "ElementType" -> "String"]]}}]]]];TimeSeries[tab, {{Yesterday, Today, Tomorrow}}, ComponentKeys -> Automatic]Tabular[%]tab = Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["K1" -> Association["ElementType" -> "Real64"],
"K2" -> Association["ElementType" -> "String"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0.1, 0.2, 0.3}, {}, None},
"ElementType" -> "Real64"]], TabularColumn[Association[
"Data" -> {{3, {0, 3, 6, 9}, "catdogfox"}, {}, None}, "ElementType" -> "String"]]}}]]]];TimeSeries[tab, {{Yesterday, Today, Tomorrow}}, ComponentKeys -> {"a", "b"}]Tabular[%]成分キーがNoneに設定されていると,出力の時系列は明示的な成分がない簡単なものになる:
tab = Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["K1" -> Association["ElementType" -> "Real64"],
"K2" -> Association["ElementType" -> "String"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0.1, 0.2, 0.3}, {}, None},
"ElementType" -> "Real64"]], TabularColumn[Association[
"Data" -> {{3, {0, 3, 6, 9}, "catdogfox"}, {}, None}, "ElementType" -> "String"]]}}]]]];TimeSeries[tab, {{Yesterday, Today, Tomorrow}}, ComponentKeys -> None]Tabular[%]入力キーがない場合,Automatic設定は単純な成分入力を保存する:
TimeSeries[{{.1, "cat"}, {.2, "dog"}, {.3, "fox"}}, {{Yesterday, Today, Tomorrow}}, ComponentKeys -> Automatic]Tabular[%]特性と関係 (2)
成分キーは第3引数またはオプションとして与えることができる:
vals = {{.1, "cat"}, {.2, "dog"}, {.3, "fox"}};
times = {Yesterday, Today, Tomorrow};
keys = {"number", "animal"};TimeSeries[vals, {times}, keys]TimeSeries[vals, {times}, ComponentKeys -> keys] === %引数として与えられた成分キーは,オプションによって与えられたそれを無効にする:
TimeSeries[{{.1, "cat"}, {.2, "dog"}, {.3, "fox"}}, {{Yesterday, Today, Tomorrow}}, {"A", "B"}, ComponentKeys -> {"a", "b"}]Tabular[%]テキスト
Wolfram Research (2026), ComponentKeys, Wolfram言語関数, https://reference.wolfram.com/language/ref/ComponentKeys.html.
CMS
Wolfram Language. 2026. "ComponentKeys." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ComponentKeys.html.
APA
Wolfram Language. (2026). ComponentKeys. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ComponentKeys.html
BibTeX
@misc{reference.wolfram_2026_componentkeys, author="Wolfram Research", title="{ComponentKeys}", year="2026", howpublished="\url{https://reference.wolfram.com/language/ref/ComponentKeys.html}", note=[Accessed: 20-September-2026]}
BibLaTeX
@online{reference.wolfram_2026_componentkeys, organization={Wolfram Research}, title={ComponentKeys}, year={2026}, url={https://reference.wolfram.com/language/ref/ComponentKeys.html}, note=[Accessed: 20-September-2026]}