path = '../data/'
reader = pd.read_csv(path+'train_20190518.csv', iterator=True,
names=['label','uid','adid','operTime','siteid','slotid','contentid','netType'])
loop = True
chunkSize = 1000000
chunks = []
while loop:
try:
chunk = reader.get_chunk(chunkSize)
chunks.append(chunk[chunk.operTime>'2019-04-02 00:00:00.000'])
except StopIteration:
loop = False
print("Iteration is stopped.")
df = pd.concat(chunks, ignore_index=True)