Series - PANDAS Series Flashcards
SERIES - A Pandas Series is like a column in a table.
Pandas Series
SERIES - It is a one-dimensional array holding data of any type.
Pandas Series
LABELS - If nothing else is specified, the values are labeled with their index number. First value has index 0, second value has index 1 etc.
Labels
LABELS - This label can be used to access a specified value.
Labels
LABELS - With the index argument, you can name your own labels.
Create Labels
LABELS - When you have created labels, you can access an item by referring to the label.
Create Labels
LABELS - You can also use a key/value object, like a dictionary, when creating a Series.
Key/Value Objects as Series
LABELS - The keys of the dictionary become the labels.
Keys of Dictionary
INDEX - To select only some of the items in the dictionary, use the index argument and specify only the items you want to include in the Series.
Index Argument
DATAFRAMES - Data sets in Pandas are usually multi-dimensional tables, called DataFrames.
DataFrames
DATAFRAMES - Series is like a column, a DataFrame is the whole table.
DataFrames
EXERCISE - True or False. A Series is like a row in a table.
False
EXERCISE - Insert the correct Pandas method to create a Series.
pd.Series (mylist)
EXERCISE - Insert the correct syntax to return the first value of a Pandas Series called “myseries”?
myseries[0]
Insert the correct syntax to add the labels “x”, “y”, and “z” to a Pandas Series.
pd.Series(mylist, index = [“x”, “y”, “z”])