Skip to content

Commit be36f37

Browse files
better timeseries dataset
1 parent b788721 commit be36f37

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

packages/python/plotly/plotly/data/__init__.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,21 +102,20 @@ def carshare():
102102
return _get_dataset("carshare")
103103

104104

105-
def timeseries(indexed=False):
105+
def stocks(indexed=False):
106106
"""
107-
Each row in this wide dataset represents values from 6 random walk time-series. The
108-
index contains dates.
107+
Each row in this wide dataset represents closing prices from 6 tech stocks in 2018/2019.
109108
110109
Returns:
111110
A `pandas.DataFrame` with 100 rows and the following columns:
112-
`['day', 'MOL.AA', 'JJK.OB', 'LFF.KP', 'UJS.PX', 'BTK.HH', 'SHX.QQ']`.
113-
If `indexed` is True, the 'day' column is used as the index and the column index
114-
is named 'ticker'
111+
`['date', 'GOOG', 'AAPL', 'AMZN', 'FB', 'NFLX', 'MSFT']`.
112+
If `indexed` is True, the 'date' column is used as the index and the column index
113+
is named 'company'
115114
"""
116-
df = _get_dataset("timeseries")
115+
df = _get_dataset("stocks")
117116
if indexed:
118-
df = df.set_index("day")
119-
df.columns.name = "ticker"
117+
df = df.set_index("date")
118+
df.columns.name = "company"
120119
return df
121120

122121

Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)