title: Is it possible to use column names with spaces in NamedAgg expressions?
body: <p>Is it possible to create names with spaces and special characters when naming an aggregation column using <code>pandas.NamedAgg</code> aggregation function? The typical syntax would be:</p>
  
  <pre><code>pvt = (df.groupby(by=[....])
           .agg(value=pd.NamedAgg(column='col', aggfunc='count'))
        )      
  </code></pre>
  
  <p>But is there a way to create a column name that is not a valid python variable name (as <code>value</code> in this example), but something like <code>'my new column name'</code>?</p>
  
  <p>The only solution that I can think of now is to rename <code>value</code> afterwards:</p>
  
  <pre><code>.rename(columns={'value': 'my new column name'})
  </code></pre>