Pandas

From wiki
Revision as of 16:20, 15 December 2018 by Hdridder (talk | contribs) (Created page with "Check the [https://pandas.pydata.org/pandas-docs/stable/10min.html 10 minutes to Pandas] too. ;import pandas as pd :Import the library, we assume this was done on this page ;s...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Check the 10 minutes to Pandas too.

import pandas as pd
Import the library, we assume this was done on this page
s = pd.Series([])
Initialize a series

All in 1 example:

import numpy as np
import pandas as pd
s = pd.Series([])
for i in range(50):
    s[i] = int(np.random.random() * 100)

Funny, you can do s[0] but not

for i in s:
    print(s[i])

To get all values from the series you do:

for v in s:
    print(v)