title: Group values by filename extension pandas
body: <p>I have a dataframe with many types of files (.svg, .png, csv, etc). And there are some files which do not have an extension. </p>
  
  <p>How can I group those files without an extension and make a pie chart like this one?</p>
  
  <p><a href="https://i.stack.imgur.com/jv5xx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jv5xx.png" alt="enter image description here"></a></p>
  
  <pre><code>import pandas as pd
  
  df = pd.DataFrame({'file_name': ['filelist.xml', 'sheet002', 'sheet005.htm', 'image1.jpg', 'image3.jpg',
     'kings.xls', 'Kings.png', 'Kings', 'Riders', 'Royals.pdf', 'Royals.csv', 'Riders.xml'],
     'created_at': ['2020-01-01 23:00:34'] *2 + ['2018-01-01 13:01:34'] *3 + ['2020-01-01 22:00:00'] *4 + ['2018-02-01 23:00:34']*3,
     'size':[8760] * 3 + [789] *4 + [863] *2 + [673] *3})
  
  
  df_unknown=df[df['file_name'].apply(lambda x: len(x.rsplit('.', 1))) &lt; 2]
  
  </code></pre>
  
  <p>EDIT
  I have so many values. The pie chart cannot show them all.
  <a href="https://i.stack.imgur.com/KV1rV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KV1rV.png" alt="enter image description here"></a></p>