title: Why am I getting a recursive error when I generate dataframe with an argument from another dataframe?
body: <p>I generate dataframe get_your_holdings, and use dataframe.apply to send each row to get_fund_holdings.
  I'm not even sure this is right way to do that, but before I address that I noticed in my test file here I get a recursive error just from trying to generate a dataframe--see below.</p>
  <pre><code>import pandas as pd
  
  
  def get_your_holdings():
      your_holdings = [['foo', 100], ['bar', 200]]
      df = pd.DataFrame(your_holdings, columns=['Symbol', 'Equity'])
      return df
  
  
  def get_fund_holdings(symbol, equity):
  
      # IRL, foo and bar are scraped, instead of being kept as lists in the code...
      foo = [['aapl', 0.6], ['amzn', 0.3], ['msft', 0.2]]
      bar = [['tsla', 0.4], ['amzn', 0.5], ['goog', 0.2]]
  
      df = pd.DataFrame(symbol, columns=['Symbol', '% Holding'])
      total_equity = equity * 100
      df['% Holding'] = total_equity * df['% Holding']
  
      df.rename(columns={'% Holding': 'Equity'}, inplace=True)
  
      return df
  
  
  def main():
      df = get_your_holdings()
  
      # certainly not sure if this is right.
      # was originally going to ask about this
      # but want to make sure get_fund_holding works
      results = (df.apply(lambda x: get_fund_holdings(x['Symbol'], x['Equity']), axis=1, result_type='expand'))
      breakpoint()
  
  if __name__ == &quot;__main__&quot;:
      main()
  </code></pre>
  <p>Not sure if the full traceback is useful because its quite long. Highlights include:</p>
  <pre><code>  File &quot;C:/Users/jajam/PycharmProjects/heatmap/test.py&quot;, line 31, in &lt;lambda&gt;
      results = (df.apply(lambda x: get_fund_holdings(x['Symbol'], x['Equity']), axis=1, result_type='expand'))
    File &quot;C:/Users/jajam/PycharmProjects/heatmap/test.py&quot;, line 16, in get_fund_holdings
      df = pd.DataFrame(symbol, columns=['Symbol', '% Holding'])
    File &quot;C:\Users\jajam\anaconda3\envs\finance\lib\site-packages\pandas\core\frame.py&quot;, line 590, in __init__
      raise ValueError(&quot;DataFrame constructor not properly called!&quot;)
  ValueError: DataFrame constructor not properly called!
  </code></pre>
  <p>and</p>
  <pre><code>RecursionError: maximum recursion depth exceeded while calling a Python object
  Unexpected error, recovered safely.
  </code></pre>
  <p>Is there a way I should be calling this? I'm also not sure how to parse the data I get returned from the lamda x, but I was going to make a separate question when the syntax here is actually right.</p>