title: Error using Santiment sanpy library for cryptocurrency data analysis
body: <p>I am using <em>sanpy</em> to gather crypto market data, compute alpha, beta and rsquared with <em>statsmodels</em>, and then create a <strong>crypto = input(&quot;Cryptocurrency: &quot;)</strong> function with a <strong>while</strong> loop that allows me to ask the user for an specific crypto and output its respective statistics, followed by showing the input again.</p>
  <p>With the following code I receive the error: <strong>ValueError: If using all scalar values, you must pass an index</strong></p>
  <pre><code>import san
  import numpy as np
  import matplotlib.pyplot as plt
  import pandas as pd
  import datetime
  import statsmodels.api as sm
  from statsmodels import regression
  
  cryptos = [&quot;bitcoin&quot;, &quot;ethereum&quot;, &quot;ripple&quot;, &quot;bitcoin-cash&quot;, &quot;tether&quot;,
  &quot;bitcoin-sv&quot;, &quot;litecoin&quot;, &quot;binance-coin&quot;, &quot;eos&quot;, &quot;chainlink&quot;,
  &quot;monero&quot;, &quot;bitcoin-gold&quot;]
  
  def get_and_process_data(c):
      raw_data = san.get(&quot;daily_closing_price_usd/&quot; + c, from_date=&quot;2014-12-31&quot;, to_date=&quot;2019-12-31&quot;, interval=&quot;1d&quot;) # &quot;query/slug&quot;
      return raw_data.pct_change()[1:]
  
  
  df = pd.DataFrame({c: get_and_process_data(c) for c in cryptos})
  
  df['MKT Return'] = df.mean(axis=1) # avg market return
  #print(df) # show dataframe with all data
  
  def model(x, y):
      # Calculate r-squared
      X = sm.add_constant(x) # artificially add intercept to x, as advised in the docs
      model = sm.OLS(y,X).fit()
      rsquared = model.rsquared
      
      # Fit linear regression and calculate alpha and beta
      X = sm.add_constant(x)
      model = regression.linear_model.OLS(y,X).fit()
      alpha = model.params[0]
      beta = model.params[1]
  
      return rsquared, alpha, beta
  
  results = pd.DataFrame({c: model(df[df[c].notnull()]['MKT Return'], df[df[c].notnull()][c]) for c in cryptos}).transpose()
  results.columns = ['rsquared', 'alpha', 'beta']
  print(results)
  </code></pre>
  <p>The error is in the following line:</p>
  <pre><code>df = pd.DataFrame({c: get_and_process_data(c) for c in cryptos})
  </code></pre>
  <p>I tried solving the issue by changing it to:</p>
  <pre><code>df = {c: get_and_process_data(c) for c in cryptos}
  
  df['MKT Return'] = df.mean(axis=1) # avg market return
  print(df) # show dataframe with all data
  </code></pre>
  <p>But with that, it gave me a different error: <strong>AttributeError: 'dict' object has no attribute 'mean'</strong>.</p>
  <p>The goal is to create a single DataFrame with the datatime column, columns for the cryptos and their <em>pct.change</em> data, an additional column for MKT Return with the daily <em>mean</em> from all cryptos' <em>pct.change</em>. Then, use all this data to calculate each crypto's statistics and finally create the input function mentioned at the beginning.</p>
  <p>I hope I made myself clear and that someone is able to help me with this matter.</p>