title: Subset of dataframe, "not in index " error
body: <p>I have the following dataframe:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Name</th>
  <th>1 -30</th>
  <th>Limit</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>A</td>
  <td>100</td>
  <td>1000</td>
  </tr>
  <tr>
  <td>B</td>
  <td>200</td>
  <td>1000</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I am trying to create a subset of this dataframe, for only the first two columns, with the following code:</p>
  <p>Sub_DF = DF[[&quot;Name&quot;,&quot;1-30&quot;]]</p>
  <p>This unfortunately leads to the following error: KeyError: &quot;['1-30'] not in index&quot;</p>
  <p>So my expected output should look like this:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Name</th>
  <th>1 -30</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>A</td>
  <td>100</td>
  </tr>
  <tr>
  <td>B</td>
  <td>200</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I have tried using the iloc function but that did not help. I also tried to enter 1-30 without quotation marks.</p>
  <p>Please find below the info about the column names:</p>
  <ul>
  <li><strong>Name</strong>         243 non-null    object</li>
  <li><strong>1 -  30</strong>      245 non-null    float64</li>
  <li><strong>Cred.limit</strong>   213 non-null    float64</li>
  </ul>
  <p>Any tips? Please note that I am new to programming :)</p>