Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- In[25]:%timeit 12345 in df.CID
- Out[25]:89.8 µs ± 254 ns per loop (mean ± std. dev. of 7 runs, 10000 loops each)
- In[26]:%timeit 12345 in df['CID']
- Out[26]:42.3 µs ± 334 ns per loop (mean ± std. dev. of 7 runs, 10000 loops each)
- In[27]:type( df.CID)
- Out[27]: pandas.core.series.Series
- In[28]:type( df['CID'])
- Out[28]: pandas.core.series.Series
- df = pd.DataFrame({'A': [1, 2, 3]})
- df.A
- 0 1
- 1 2
- 2 3
- Name: A, dtype: int64
- df.pop
- # <bound method NDFrame.pop of ...>
- df['pop'] = [4, 5, 6]
- df
- A pop
- 0 1 4
- 1 2 5
- 2 3 6
- df.pop
- # <bound method NDFrame.pop of ...>
- df['pop']
- 0 4
- 1 5
- 2 6
- Name: pop, dtype: int64
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement