Datasets:
fix typing error in stocks.py
Browse filesFix error in typing which cause the following exception:
File "/home/runner/.cache/huggingface/modules/datasets_modules/datasets/jlh-ibm--earnings_call/012754cae93b94f9282e75f1fcbc0b479228ef5d457509460e0c81633c79acfd/stocks.py", line 10, in StockMarketAnalyzer
market_data: dict[str, pd.DataFrame],
stocks.py
CHANGED
@@ -7,7 +7,7 @@ import pandas as pd
|
|
7 |
class StockMarketAnalyzer:
|
8 |
def __init__(
|
9 |
self,
|
10 |
-
market_data:
|
11 |
sector: str = "NASDAQ",
|
12 |
date_col: str = "Date",
|
13 |
price_col: str = "Open",
|
@@ -69,7 +69,7 @@ class StockMarketAnalyzer:
|
|
69 |
return stock_ratio > sector_ratio
|
70 |
|
71 |
|
72 |
-
def load_stock_prices(files: Iterable[Path]) ->
|
73 |
"""
|
74 |
Load stock prices from CSV files into a dictionary of DataFrames.
|
75 |
|
@@ -78,7 +78,7 @@ def load_stock_prices(files: Iterable[Path]) -> dict[str, pd.DataFrame]:
|
|
78 |
CSV files to load.
|
79 |
|
80 |
Returns:
|
81 |
-
|
82 |
(extracted from the file names) and the values are pandas DataFrames
|
83 |
containing the stock prices for each company.
|
84 |
"""
|
|
|
7 |
class StockMarketAnalyzer:
|
8 |
def __init__(
|
9 |
self,
|
10 |
+
market_data: Dict[str, pd.DataFrame],
|
11 |
sector: str = "NASDAQ",
|
12 |
date_col: str = "Date",
|
13 |
price_col: str = "Open",
|
|
|
69 |
return stock_ratio > sector_ratio
|
70 |
|
71 |
|
72 |
+
def load_stock_prices(files: Iterable[Path]) -> Dict[str, pd.DataFrame]:
|
73 |
"""
|
74 |
Load stock prices from CSV files into a dictionary of DataFrames.
|
75 |
|
|
|
78 |
CSV files to load.
|
79 |
|
80 |
Returns:
|
81 |
+
Dict[str, pd.DataFrame]: A dictionary where the keys are the company names
|
82 |
(extracted from the file names) and the values are pandas DataFrames
|
83 |
containing the stock prices for each company.
|
84 |
"""
|