Advertisement
santimirandarp

short code not working for unknown reason

May 11th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.93 KB | None | 0 0
  1. θ diedro,ΔE(Eₒ−Z.P.E),,,θ diedro,ΔE(Eₒ−Z.P.E),,,θ diedro,ΔE(Eₒ−Z.P.E),,,θ diedro,ΔE(Eₒ−Z.P.E)
  2. "0,0000","-0,0006",,,"0,0000","0,0006",,,"0,0000","0,0025",,,"0,0000","-0,0013"
  3. "20,0000","0,5183",,,"20,0000","0,5459",,,"20,0000","0,6194",,,"20,0000","0,5190"
  4. "40,0000","1,8549",,,"40,0000","1,9271",,,"40,0000","1,9905",,,"40,0000","1,7972"
  5. "60,0000","2,8878",,,"60,0000","2,9474",,,"60,0000","2,8734",,,"60,0000","2,6807"
  6. .
  7. .
  8. .
  9.  
  10. import pandas as pd
  11. import matplotlib.pyplot as plt
  12.  
  13. filename='valen.csv'
  14.  
  15. data1 = pd.read_csv(filename,usecols=[0,1], nrows=20, decimal=',')
  16. #data2 = pd.read_csv(filename,usecols=[4,5], nrows=20,decimal=',')
  17. #data3 = pd.read_csv(filename,usecols=[8,9], nrows=20,decimal=',')
  18.  
  19. y=data1.iloc[:,1]
  20. x=data1.iloc[:,0]
  21.  
  22. plt.plot(x,y)
  23.  
  24. plt.show()
  25.  
  26.  
  27. #problem: it returns an error: UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 0: ordinal not in range(128)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement