For python 3.8 try:
def f() -> "pd.Series[str]":
pass
or:
f_return_type = "pd.Series[str]"
def f() -> f_return_type:
pass
or # type: pd.Series[str]
for variables
For python 3.8 try:
def f() -> "pd.Series[str]":
pass
or:
f_return_type = "pd.Series[str]"
def f() -> f_return_type:
pass
or # type: pd.Series[str]
for variables