Skip to content

Commit

Permalink
typefix: add pd.Series[str] as typehint to avoid mypy error
Browse files Browse the repository at this point in the history
  • Loading branch information
randomseed42 committed Jan 5, 2025
1 parent e74d5f4 commit 16ec9c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bokeh_sampledata/browsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

def _read_data() -> pd.DataFrame:
df = package_csv("browsers_nov_2013.csv", names=("Version", "Share"), skiprows=1)
versions = df["Version"].map(lambda x: x.rsplit(" ", 1))
versions: pd.Series[str] = df["Version"].map(lambda x: x.rsplit(" ", 1))
df["Browser"] = versions.map(lambda x: x[0])
df["VersionNumber"] = versions.map(lambda x: x[1] if len(x) == 2 else "0")
return df
Expand Down

0 comments on commit 16ec9c1

Please sign in to comment.