Skip to content

sub/mul/div for Series does not accept scalar #2574

Closed
@dalejung

Description

@dalejung
import panda as pd

s = pd.Series(range(10))
s.sub(1)

# AssertionError: Other operand must be Series

df = pd.DataFrame({'test':s})
df.sub(1) # works

Am I misunderstanding or should scalars work with sub/mul/div/etc?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions