Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

grab_data.py 315B

1234567891011
  1. import pandas
  2. import numpy as np
  3. csv = pandas.read_csv("WILL5000INDFC.csv")
  4. extraction = csv["WILL5000INDFC"].tolist()
  5. for i in range(len(extraction)) :
  6. if extraction[i] == "." :
  7. extraction[i] = extraction[i-1]
  8. extraction = np.array(extraction).astype(float)
  9. print(extraction)
  10. np.save("dataset.npy", extraction)