title: Code to identify a specific aspect inside of a database and return the number associated with that aspect?
body: <p>I am relatively new to python and I am using yfinance and pandas to scrape financial data from yahoo finance. I will provide code below, but basically, I am wondering how I can get, inside of the database, a line of code that will return the number associated with 'Capital Expenditure' for example. I am really lost on how to do this, I'm not even sure how to ask my question since in Excel I'll typically use =sumif() functions to return these values. I have provided my code below.</p>
  <pre><code>import yfinance as yf
  import pandas as pd
  import requests
  import numpy as np
  import datetime as dt
  
  msft = yk.Ticker(&quot;MSFT&quot;)
  
  df = msft.cashflow
  
  print(df)
  </code></pre>
  <p>What will happen here is that I am returning the statement of cash flows into this database here, and then I want to just isolate the dollar amount associated with 'Capital Expenditure' for this year. Here is a picture of the database below.</p>
  <p><a href="https://i.stack.imgur.com/sh5I8.png" rel="nofollow noreferrer">I've highlighted in red what I'm trying to do here in this image.</a></p>
  <p>Any help would be truly and greatly appreciated, since this is really just the final step before my school project is finalized.</p>