title: pandas dataframe: convert symbol -
body: <p>I am working with pandas DataFrame. If I print the dataframe, it contains some columns with scripts(-) in place of numbers. When I use the data to make charts, termninal returns:</p>
  
  <pre><code>TypeError: Empty 'Series': no numeric data to plot
  </code></pre>
  
  <p>Can those script (-) data points not to be used when making the graph? Do they need to be replaced? If it is so, how?</p>
  
  <p>The code I wrote is:</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  import matplotlib.pyplot as plt
  df=pd.read_csv('data', sep=',')
  a_list=list(df.columns.values)
  #df=df.astype(float)
  for ielement in range(len(a_list)):
      print ("column name is %s" %(a_list[ielement]))
      if a_list[ielement]!= 'age':
          df.plot(x='age', y=a_list[ielement])
          plt.savefig(a_list[ielement] + '.png')
          plt.clf()
  </code></pre>
  
  <p><strong>Examle Data</strong></p>
  
  <p><code>data.csv</code></p>
  
  <pre><code>a,b,c,d,e,f,g,h,i,j,k,l,m,n,nn,o,p,q,r,s,t,u,v,w,x,y,z,hh
      12,2798,3.9,3.0,1.1,4.0,0.1,5.0,0.0,-,0.1,35.5,0.2,52.0,1.6,19.0,2.0,36.0,0.1,24.5,0.2,52.0,0.2,2.0,0.0,-,0.2,13.0
      13,2757,8.5,6.0,3.4,15.0,0.1,1.0,0.0,3.0,0.0,-,0.6,6.0,2.5,12.0,2.4,14.0,0.1,41.0,0.3,25.5,0.3,4.0,0.1,5.0,0.1,19.0
      14,2792,18.1,5.0,8.7,24.0,0.1,5.5,0.0,-,0.1,2.0,1.6,3.0,2.6,5.0,3.9,12.0,0.4,4.5,0.9,5.0,0.8,12.0,0.1,24.0,0.2,16.5
      15,2956,29.2,6.0,14.5,25.0,0.5,4.0,0.1,9.5,0.2,1.0,2.1,4.0,2.5,5.5,5.5,10.0,0.8,3.0,2.0,4.5,1.5,6.0,0.3,10.5,0.4,30.0
  </code></pre>
  
  <p>Using Evan's answer: <code>df.replace(to_replace = '-', value = np.nan, inplace = True)</code>still got same error.</p>
  
  <p>and it works for the first columns, because these don't have scripts(-) </p>