Analyzing Financial Statements in Python
Rohan Chatterjee
Risk Modeler
balance_sheet["current_ratio"] =
balance_sheet["Total Current Assets"]/
balance_sheet["Total Current Liabilities"]
balance_sheet.pivot_table(index="comp_type", values="current_ratio")
balance_sheet["debt_to_equity"] =
balance_sheet["Total Liabilities"]/
balance_sheet["Total Shareholders Equity"]
balance_sheet.pivot_table(index="comp_type", values="debt_to_equity")
plot = balance_sheet_tech.pivot_table(index="company", values = "current_ratio",
margins = True).reset_index()
plot
sns.barplot(data=plot, x = "company", y = "current_ratio")
plt.ylabel("Current Ratio"), plt.xlabel("Company")
plt.show()
Analyzing Financial Statements in Python