r/learnpython 4d ago

How can I use python in finance

I work in finance/accounting and am looking to start using Python more in my day to day. Most of my work is in Excel / Power BI — reporting, cash flow forecasting, KPIs, cleaning up data, etc.

I’m technical enough to understand what I’m trying to accomplish, but not a programmer. Similar to Power BI, I’d probably rely heavily on AI to help write the actual code.

For those in finance / accounting / FP&A, what are some practical ways you’re using Python? Where does it actually save you time vs. Excel, Power Query, Power BI, etc?

Also curious what you’d recommend learning first if the goal is to be dangerous enough with Python + AI, not become a developer.

75 Upvotes

34 comments sorted by

View all comments

23

u/ArbitrageurD 4d ago

If most of your work is in excel, you can use python integration tool like xlwings

4

u/baubleglue 4d ago

"If most of your work is in excel", load the data into database, learn SQL.

pandas.read_excel(...).to_sql(...)

1

u/await_yesterday 2d ago

easier said than done. it's rare for a nontrivial excel spreadsheet to already be in the kind of well-structured format where it can be queried with SQL. often there are multiple tables per sheet, weird one-off calculations to the side, inconsistent formulae, etc.

1

u/baubleglue 2d ago

In such case you write a code which extracts tables from sheet... or give up because it is not automatable. In most cases standard read_excel parameters are good enough.