title: How to split a dataframe to multiple dataframes bases on column names
body: <p>My dataframe is as below,</p>
  
  <pre><code> _dict = {'t_head': ['H1', 'H2', 'H3', 'H4', 'H5','H6'], 
              'r_head': ['Revenue', 'Revenue', 'Income', 'Income', 'Cash', 'Expenses'], 
              '3ME__ Q219': [159.9, '', 45.6, '', '', ''], 
              '3ME__ Q218': [112.3, '', 27.2, '', '', ''], 
              '3ME__ Q119': [121.0, '', 23.1, '', '', ''], 
              '3ME__ Q18': [85.7, '', 15.3, '', '', ''], 
              '3ME__ Q418': [160.5, '', 51.1, '', '', ''], 
              '9ME__ Q417': [102.6, '', 24.2, '', '', ''], 
              '9ME__ Q318': [118.8, '', 30.2, '', '', ''], 
              '9ME__ Q317': [79.4, '', 15.3, '', '', ''], 
              '6ME__ Q219': ['', 280.9, '', 68.7, '', ''], 
              '6ME__ Q218': ['', 198.0, '', 42.6, '', ''], 
              'Q219': ['', '', '', '', 1305, 1239], 
              'Q418': ['', '', '', '', 2072, 1117]
              }
  df = pd.DataFrame.from_dict(_dict)
  print(df)  
  
    t_head    r_head 3ME__ Q219 3ME__ Q218 3ME__ Q119 3ME__ Q18 3ME__ Q418 9ME__ Q417 9ME__ Q318 9ME__ Q317 6ME__ Q219 6ME__ Q218  Q219  Q418
  0     H1   Revenue      159.9      112.3        121      85.7      160.5      102.6      118.8       79.4                                  
  1     H2   Revenue                                                                                             280.9        198            
  2     H3    Income       45.6       27.2       23.1      15.3       51.1       24.2       30.2       15.3                                  
  3     H4    Income                                                                                              68.7       42.6            
  4     H5      Cash                                                                                                               1305  2072
  5     H6  Expenses                                                                                                               1239  1117
  </code></pre>
  
  <p>I want to split this dataframe into multiple dtaframes base on column heading. Here column headings <strong>can</strong> start with <code>3ME__</code>,<code>6ME__</code>,<code>9ME__</code> (<em>all/any/none can be present</em>) or other values. i want to all columns starting with <code>3ME__</code> to be in one dataframe,<code>6ME__</code> to another...etc. and the all of the rest to be in a fourth dataframe.<br>
  What i had tried is as below,</p>
  
  <pre><code>df1 = df.filter(regex='3ME__')
  if not df1.empty:
      df1 = df1[df1.iloc[:,0].astype(bool)]
  df2 = df.filter(regex='6ME__')
  if not df2.empty:
      df2 = df2[df2.iloc[:,0].astype(bool)]
  df3 = df.filter(regex='9ME__')
  if not df3.empty:
      df3 = df3[df3.iloc[:,0].astype(bool)]
  </code></pre>
  
  <p>Here i am able to filter out column names starting with<code>3ME__</code>,<code>6ME__</code> &amp; <code>9ME__</code> to different dataframes, but <strong>not able to get the rest of column headings to one dataframe</strong>.   </p>
  
  <p>1.) <em>How to get the rest of column headings to one dataframe?</em><br>
  2.) <em>Is there any simpler method to split into dictionary with a key and dataframes as values?</em>  </p>
  
  <p>Please Help. </p>