title: Can't Remove White Spaces from CSV Headers with Pandas
body: <p>I'm trying to rename headers in a csv that have white spaces. Using these lines from the Pandas API reference is not working. The headers still have white spaces instead of underscores. </p>
  
  <pre><code>import pandas as pd
  
  df = pd.read_csv("my.csv",low_memory=False)
  df.columns = df.columns.str.strip().str.lower().str.replace(' ', '_')
  </code></pre>