Since 166.20 ≈ 581665650.50 / 3500000.00, I would guess that maybe you somehow changed the value of the "EBITDA last 4 quarters" column before you printed out that row.
Python dataframes are passed by reference, so any intermediate function that mutates the values within a dataframe that is passed in as an argument would also mutate the original dataframe itself.
If you paste your entire code snippet, we can help you debug further.