Pandas creates or ‘hallucinates’ values that don’t exist.
import pandas as pd
df = pd.read_parquet('filtered_ticks.parquet/part.10.parquet')
for index, row in df.iterrows():
price = row['price'] / 1e9
if price >= 200:
print(price, index)
# print(df['price'].tolist()[467384] / 1e9)
I run it then i get a value like 203.20, 467384 on the console,
then i uncomment the print at the end of the file and comment the for loop.
It then prints 185.87 which I know to be right since the file cannot contain anything larger than around 197.00.
New contributor
H. D. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.