'After filtering I am unable to find the minimum value in the pandas dataframe

I am trying to find the minimum Total Charges for the Los Angeles City from my data frame, I have attached the screenshot of my data frame City and Total Charges would be visible in my dataset, So I have already tried few things but nothing worked.

enter image description here

Here is the code which I used where tcc is my dataset:

lacity = tcc[tcc["City"] == "Los Angeles"]
lacity[lacity.tcc["Total Charges"] == lacity.tcc["Total Charges"].min()

When I filter with Los Angeles it is working fine, but when I am trying to filter it with minimum total charges, it is giving me an error

AttributeError: 'DataFrame' object has no attribute 'tcc'



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source