title: convert pandas dataframe value to scalar
body: <p>How do I convert a pandas data frame with 1 row, 1 column into a scalar value?</p>
  
  <pre><code>import pandas as pd
  data = {'col1': 1}
  df = pd.DataFrame(data=d)
  </code></pre>