nickderobertis / capiq-excel-downloader-py Goto Github PK
View Code? Open in Web Editor NEWCapital IQ Data Downloader using Python to drive Excel Plugin
License: MIT License
Capital IQ Data Downloader using Python to drive Excel Plugin
License: MIT License
Since Pandas 2.0, you cannot append a dataframe to another dataframe with df.append. An alternative is to use pd.concat.
I am running the following code :
import xlsxwriter
import xlsxwriter as xl
from capiq_excel import download_data
download_data(
['MSFT','AAPL'], # Any id type. Ticker, name, CUSIP, ISIN, etc.
financial_data_items=['IQ_REV', 'IQ_EBIT'], # Financial data variable names from Capital IQ
freq='Q',
num_periods=4
)
And getting the following error :
com_error Traceback (most recent call last)
in
7 from capiq_excel import download_data
8
----> 9 download_data(
10 ['MSFT','AAPL'], # Any id type. Ticker, name, CUSIP, ISIN, etc.
11 financial_data_items=['IQ_REV', 'IQ_EBIT'], # Financial data variable names from Capital IQ
c:\users\kapis\appdata\local\programs\python\python38-32\lib\site-packages\capiq_excel\main.py in download_data(company_ids, financial_data_items, market_data_items, ids_folder, data_folder, data_outpath, ids_outpath, restart, timeout, run_failed, **financial_command_kwargs)
36
37 if restart or not os.path.exists(ids_outpath):
---> 38 capiq_ids = download_capiq_ids(
39 company_ids,
40 outpath=ids_outpath,
c:\users\kapis\appdata\local\programs\python\python38-32\lib\site-packages\capiq_excel\ids.py in download_capiq_ids(ids, outpath, folder)
24
25 print('Populating XLSX files for ids')
---> 26 populate_all_ids_in_folder(folder)
27
28 print('Combining all ids into a single CSV file')
c:\users\kapis\appdata\local\programs\python\python38-32\lib\site-packages\capiq_excel\ids.py in populate_all_ids_in_folder(folder, restart)
37
38 for file in file_tracker.file_generator():
---> 39 populate_capiq_ids_for_file(file, excel)
40
41
c:\users\kapis\appdata\local\programs\python\python38-32\lib\site-packages\capiq_excel\workbook\populate\main.py in populate_capiq_ids_for_file(filepath, excel)
75 wb = excel.Workbooks.Open(filepath)
76 successful = _wait_for_capiq_result(excel)
---> 77 _copy_paste_values(excel, wb, cell_range='A:Z')
78 excel.ActiveWorkbook.Close(SaveChanges=True)
79 return successful
c:\users\kapis\appdata\local\programs\python\python38-32\lib\site-packages\capiq_excel\workbook\populate\main.py in _copy_paste_values(excel, wb, cell_range)
83 ws = wb.Sheets('Sheet')
84 ws.Range(cell_range).Copy()
---> 85 ws.Range(cell_range.split(':')[0]).PasteSpecial(Paste=constants.xlPasteValues, Operation=constants.xlNone)
86 excel.CutCopyMode = False
87
~\AppData\Local\Temp\gen_py\3.8\00020813-0000-0000-C000-000000000046x0x1x9_Worksheet.py in Range(self, Cell1, Cell2)
237 # The method Range is actually a property, but must be used as a method to correctly pass the arguments
238 def Range(self, Cell1=defaultNamedNotOptArg, Cell2=defaultNamedOptArg):
--> 239 ret = self.oleobj.InvokeTypes(197, LCID, 2, (9, 0), ((12, 1), (12, 17)),Cell1
240 , Cell2)
241 if ret is not None:
com_error: (-2147352567, 'Exception occurred.', (0, None, None, None, 0, -2146827284), None)
Can you tell me what am I missing here?
I'm trying to install the package using pip.
after running the
pip install capiq-excel or capiq_excel
I see an error message!
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConne
ction object at 0x000002892C9CFA90>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/capiq-excel/
I also tried to figure out the proxy setup and put a proxy address, but it complains that I cannot connect to proxy, any clue regarding this topic? Is there a simple code to use instead of downloading the whole directory? It would be very helpful to know.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.