-
| I wonder if this is a "standard" way or if the community has a consensus for the type hint of dataframe. Including the following two: import pandas as pd
def do_something(df: pd.DataFrame) -> pd.DataFrame:
    # do something
    return dfor from pandas import DataFrame
def do_something(df: DataFrame) -> DataFrame:
    # do something
    return dfI realized that there is no doc for pandas-stubs yet, but how should I write the type hint for DataFrame now? | 
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
| I think this is as subjective as allowing  | 
Beta Was this translation helpful? Give feedback.
I think this is as subjective as allowing
fromimports or not. Most people I have seen tend to do thepdimport alias, so the former is probably most common. But it's hardly a matter of right or wrong, it's completely subjective.