[英]How to create excel files and then read the files through dataframe?
I have 20 symbols for which I need to record tick data continuously for 6 hours a day every week.我有 20 个符号,我需要每周每天 6 小时连续记录刻度数据。 So I want 20 excel files to be created automatically by the module (if files don't exist) and a excel writer which stores tick data (row by row).
所以我希望模块自动创建 20 个 excel 文件(如果文件不存在)和一个存储刻度数据(逐行)的 excel 编写器。 Then I need to resample the data to 5 minutes timeframe after reading them through dataframe.
然后我需要在通过数据帧读取数据后将数据重新采样到 5 分钟的时间范围。 Dataframe should be able to read the tick data created by the module.
Dataframe 应该能够读取模块创建的刻度数据。
What best excel writer can be used for this function.什么最好的 excel 编写器可用于此功能。 I want to write to the files when they are closed.
我想在文件关闭时写入文件。
which of them will work better?他们中的哪一个会更好地工作?
hello i would recommed you xlwings.你好,我会推荐你xlwings。 as it is the best module to stream the tick data to excel when file is opened.
因为它是在打开文件时将刻度数据流式传输到 excel 的最佳模块。
You can use Python's CSV Module for this.您可以为此使用 Python 的 CSV 模块。
https://docs.python.org/3/library/csv.html https://docs.python.org/3/library/csv.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.