title: Why does Pivot table return Int64 Type Error?
body: <p>I'm trying to pivot a dataframe but it keeps returning an Int64 Error. A similar question was not actually answered - <a href="https://stackoverflow.com/questions/67337512/what-causes-these-int64-columns-to-cause-a-typeerror">What causes these Int64 columns to cause a TypeError?</a></p>
  <p>Here's the type of my dataframe:</p>
  <pre><code>#   Column        Non-Null Count  Dtype 
  ---  ------        --------------  ----- 
   0   price         30159 non-null  Int64 
   1   type          30159 non-null  object
   2   size          30155 non-null  Int64 
   3   location      30159 non-null  object
   4   neighborhood  30159 non-null  object
  dtypes: Int64(2), object(3)
  </code></pre>
  <p>the pivot table code:</p>
  <pre><code>pfraw = pd.pivot_table(pfraw, values = 'price', index = 'neighborhood', columns = 'type')
  </code></pre>
  <p>and the lat bit of the error message:</p>
  <pre><code>    273     dtype = np.dtype(dtype)
      275 if not isinstance(dtype, np.dtype):
      276     # enforce our signature annotation
  --&gt; 277     raise TypeError(dtype)  # pragma: no cover
      279 converted = maybe_downcast_numeric(result, dtype, do_round)
      280 if converted is not result:
  
  TypeError: Int64
  </code></pre>
  <p>I dont understand why would it return an error with Int64.</p>