pandas set index integer not float

Solutions on MaxInterview for pandas set index integer not float by the best coders in the world

showing results for - "pandas set index integer not float"
Sofia
16 Mar 2017
1df["int"] = pd.Series([], dtype=object)
2df["str"] = pd.Series([], dtype=str)
3df.loc[0] = [0, "zero"]
4print(df)
5print()
6df.loc[1] = [1, None]
7print(df)
8
9   int   str
100    0  zero
111  NaN   NaN
12
13  int   str
140   0  zero
151   1  None
16
similar questions
queries leading to this page
pandas set index integer not float