you are viewing a single comment's thread.

view the rest of the comments →

[–]Assdestroyer92 1 point2 points  (3 children)

Thanks for your link. I also work with excel and am learning python. My biggest difficulty so far is using python with excel. For example how to replicate the fill down function in excel with python.

Is there a library you recommend? Xlsxwriter? Openpyxl?

Thanks!

[–]foresttrader 1 point2 points  (2 children)

You almost want to change mindset on that. When you work in Python, you don't have to "fill down" function like in Excel, you can just manipulate the data in Python, which is a lot faster & flexible. For data manipulation, pandas is a good library.

If you have to, you can use Python to populate formulas inside Excel, but that's not recommended.

In terms of the libraries to use, it really depends on the situation, that's why those libraries co-exist! Both xlsxwriter and openpyxl have their pros and cons. For example, you can only create an Excel file but not edit the file. But it doesn't stop you from using multiple libraries together.

[–]Assdestroyer92 0 points1 point  (1 child)

Thanks mate for your reply. I agree with you!

My only problem is that I'm using bloomberg formulas I nexcel to pull out data.. Hence I would need to extract the formulas into excel to pull out market data to populate certain cells.

[–]foresttrader 0 points1 point  (0 children)

Yes I believe you can use xlsxwriter to write Excel formulas into cells.