Problem to calculate Market Cap

Hi,

I have problem to calculate Market Cap due to incorrect of shares outstanding data in routers financial statements. My code:

# QTCO: company's total common shares outstanding
financials = get_reuters_financials_reindexed_like(history.loc['Close'], ["QTCO"])
market_cap = financials.loc['QTCO', 'Amount'].rolling(90).mean() * 1000000 * history.loc['Close'].rolling(20).mean()
TNDM = 291995344
TNDM_rencent_market_cap = market_cap[291995344].tail(1)
TNDM_rencent_market_cap

Results from QuantRocket:

market cap = 0.448B
shares outstanding = 10.119M

Result from Yahoo:

market cap = 2.548B
shares outstanding = 57.23M

How to get the amount of total shares outstanding expect QTCO?

You're comparing annual reports (Reuters) with quarterly reports (Yahoo). QuantRocket returns Reuters annual reports by default because the history is deeper than for the interim/quarterly reports. Try interim:

financials = get_reuters_financials_reindexed_like(history.loc['Close'], ["QTCO"], interim=True)

Thank you for the answer!