Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. Name Time l
  2.  
  3. 1 1.129 1G-d
  4.  
  5. 1 0.113 1G-a
  6.  
  7. 1 3.374 1B-b
  8.  
  9. 1 3.367 1B-c
  10.  
  11. 1 3.374 1B-d
  12.  
  13. 2 3.355 1B-e
  14.  
  15. 2 3.361 1B-a
  16.  
  17. 3 1.129 1G-a
  18.  
  19. # Assigns the new data frame to "df" with the data from only three columns
  20. header = ['Names','Time','l']
  21. df = pd.DataFrame(df_2, columns = header)
  22.  
  23. # Sorts the data frame by column "Names" as integers
  24. df.Names = df.Names.astype(int)
  25. df = df.sort_values(by=['Names'])
  26.  
  27. # Changes the data to match format after converting it to int
  28. df.Time=df.Time.astype(int)
  29. df.Time = df.Time/1000
  30.  
  31. csv_file = df.to_csv(index=False, columns=header, sep=" " )
  32.  
  33. plt.xlim(0, 60)
  34. plt.ylim(0, 18)
  35. plt.legend(loc='best')
  36. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement