I'm using pandas to read an Excel file which contains earthquake data from the last 10 years. However, the numbers (more specifically the decimal part) seems to change when I read into Python.
The first line has the column "EQ_PRIMARY" = 9.1 in Excel. When I try to output it in Python, I get 9.0999999999999996. This is not a big deal, but I really wanted it to output correctly without using formatting or something like that. What could be the problem?
This is how I'm reading/analyzing the dataset now:
import pandas as pd
data = pd.read_excel("Earthquakes.xls",sheet_name="earthquakes")
data["EQ_PRIMARY"].max()
And the output is
9.0999999999999996