dstream_excel package¶
Subpackages¶
- dstream_excel.dstream package
- Subpackages
- dstream_excel.dstream.keepopen package
- dstream_excel.dstream.workbook package
- Submodules
- dstream_excel.dstream.workbook.create module
- dstream_excel.dstream.workbook.exceptions module
- dstream_excel.dstream.workbook.filename module
- dstream_excel.dstream.workbook.functions module
- dstream_excel.dstream.workbook.populate module
- dstream_excel.dstream.workbook.wait module
- Module contents
- Submodules
- dstream_excel.dstream.combine module
- dstream_excel.dstream.downloader module
- Module contents
- Subpackages
- dstream_excel.tools package
- dstream_excel.tracker package
Submodules¶
dstream_excel.fileops module¶
dstream_excel.main module¶
-
dstream_excel.main.
download_datastream
(work_folder, symbol_list, variables, num_symbols_per_call=20, outpath='data.csv', restart=False, **dstream_kwargs)[source]¶ Function for full workflow to download data from Datastream.
Opens a workbook if necessary, then repeatedly switches out Datastream function, saves the values in a csv, then goes to next Datastream function. Finally, combines the created csv files into a single csv.
This function is ultimately just a wrapper which calls:
download_datastream_save_to_csvs()
to download create many CSV files containing all the datacombine_all_datastream_csv()
to combine the many CSV files created in the process into a single CSV- Parameters
work_folder (
str
) – Folder in which in process CSV files will be generatedsymbol_list (
Sequence
[str
]) – Datastream symbols representing companies. Available by selecting a list through filters in Eikon, then getting an output of that list.variables (
Sequence
[str
]) – Time-series variables to downloadnum_symbols_per_call (
Optional
[int
]) – Number of firms to gather in one pull. Setting this higher should speed up data collection, but may also make it less stable. If many variables and a longer history is being pulled, a smaller number may be necessary.outpath (
str
) – Full file path to output csv torestart (
bool
) – Whether to force a restart of download. If the process is stopped, it will be continued where it left off if restart=False, and start from the beginning if restart=True.dstream_kwargs – can pass begin, end, or freq. All of these arguments take day, month, and year as D, M, and Y. freq can be set to D, M, or Y. begin and end can be set to just Y but combined with a time modifier, e.g. begin=’-5Y’. Don’t pass end to have the data go up to current.
- Returns
None
Module contents¶
Use this tool to drive Excel using the Thompson Reuters Eikon plugin to download Datastream data. Useful for downloading large amounts of data.