title: Ignore empty values in dictionary (from large .cdt file) Python
body: <p>I'm trying to find a way to ignore the empty inputs from a large dictionary. The data comes from a .cdt file- it was originally excel but is now in text format. I've tried a few fixes and nothing works. I'm going to be finding minimum and maximum inputs and standard deviations of each of the elements of this dictionary, but I need to make sure all the empty entries are ignored first. </p>
  
  <p>This is the code I'm using to pick out and print the specific variables I want. Any pointers in the right direction would really be appreciated.</p>
  
  <p>Thanks!</p>
  
  <pre><code>planets = {}
  
  with open ('planets.csv', 'r') as f:
  
      for line in f :
  
          line = line.strip("\n ' '")
          line = line.split(",")
          name = line[1]
  
          exop = {'Host Name' : line[1],
                  'Planet Letter' : line[2],
                  'Discovery Method' : line[3],
                  'Number of Planets in System' : line[4],
                  'Orbital Period [days]' : line[5],
                  'Orbit Semi-Major Axis [AU]' : line[6],
                  'Eccentricity' : line[7],
                  'Inclination[deg]' : line[8],
                  'Planets Mass of M*sin(i)[Jupiter mass]' : line[9],
                  'Planets Mass of M*sin(i) Provenance]' : line[10],
                  'Planet Radius [Jupiter radii]' : line[11],
                  'Planet Density [g/cm**3]' : line [12],
                  'TTV Flag' : line [13],
                  'Kepler Field Flag' : line[14],
                  'K2 Mission Flag' : line[15],
                  'Number of Notes' : line[16],
                  'Distance [pc]' : line[21]
                  'Effective Temparature [k]' : line[25]}
          print exop
          print exop['Distance [pc]'] 
  f.close();
  </code></pre>