-
-
Notifications
You must be signed in to change notification settings - Fork 150
Closed
Labels
DataFrameDataFrame data structureDataFrame data structureIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselvesNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operations
Description
Describe the bug
I have:
assert df.at["a", "b"] > 0
and am getting:
error: Operator ">" not supported for types "Scalar" and "Literal[0]"
Operator ">" not supported for types "str" and "Literal[0]"
Operator ">" not supported for types "bytes" and "Literal[0]"
Operator ">" not supported for types "date" and "Literal[0]"
Operator ">" not supported for types "datetime" and "Literal[0]"
Operator ">" not supported for types "timedelta" and "Literal[0]"
Operator ">" not supported for types "Timestamp" and "Literal[0]"
Operator ">" not supported for types "Timedelta" and "Literal[0]"
Operator ">" not supported for types "complex" and "Literal[0]" (reportOperatorIssue)
I would have thought this would be fine if .at
returns an int or float (and this code runs fine) but maybe I'm missing something?
Please complete the following information:
- pandas-stubs==2.3.2.250926
- pyright v1.1.402
Thanks for your help!!
Metadata
Metadata
Assignees
Labels
DataFrameDataFrame data structureDataFrame data structureIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselvesNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operations