我正在使用Yahoo finance Python库获取会计财务数据,以进行一些基本分析。所有财务报表数据均采用JSON格式。我希望数据采用表格格式,就像我通常在Python数据帧中看到的那样。您好,数据周围有几个包装器,我不确定如何删除它们,以便将数据放入一个简单的列和行数据框中。下面是Python的外观:
{
"incomeStatementHistory":{
"F":[
{
"2019-12-31":{
"researchDevelopment":"None",
"effectOfAccountingCharges":"None",
"incomeBeforeTax":-640000000,
"minorityInterest":45000000,
"netIncome":47000000,
"sellingGeneralAdministrative":10218000000,
"grossProfit":12876000000,
"ebit":2658000000,
"operatingIncome":2658000000,
"otherOperatingExpenses":"None",
"interestExpense":-1049000000,
"extraordinaryItems":"None",
你应该用熊猫 Here its a tutorial of how to do that with pandas
你也可以检查这个question
你没有完整的回答,所以很难判断这是否是你想要的
输出:
相关问题 更多 >
编程相关推荐