【发布时间】:2021-09-08 05:30:45
【问题描述】:
这里是新手,你好!我正在使用 map() 函数通过具有多处理功能的 OHLCV 下载函数来迭代 Tickers(字符串)列表。结果,我收到了一个数据框列表。
All_coins_history = Shark_pool.map(refractor_get_history, Tickers)
由于我的历史数据框只有Dataframe[["Open", "High", "Low", "Close", "Volume"]] 格式,我无法知道 All_coins_history 列表中的哪些数据适用于哪个 Ticker。例如,创建字典而不是列表的简洁方法是什么,其中每个数据帧都将其 Ticker 作为键?
【问题讨论】:
-
请添加一些示例输入和输出数据,以及更多代码以澄清您的问题(例如,
Shark_pool、refactor_get_history和Tickers是什么?)。理想情况下,您的问题应包含minimal reproducible example。 -
请提供足够的代码,以便其他人更好地理解或重现问题。
标签: python pandas dataframe dictionary