I keep getting a Name Error in anaconda and I did try to import numpy as nan the error does not change. Anybody that can point me in the right direction??
Code snipped shared below
import pandas as pd
import lzhw
import time
#Start counting the time
start = time.perf_counter()
#Begin compression
chunks = int(gc.shape[0] / 4) ## to have 4 chunks
compressed_chunks = lzhw.CompressedFromCSV("Fake\\File\\Path\\sensor_readings.csv", chunksize = chunks)
print("Execution Complete")
CodePudding user response:
The easiest way is to import nan
from numpy:
from numpy import nan
In your snippet, by running import numpy as nan
you were making a short-hand label for numpy
, which is usually np
:
import numpy as np