Please enable JavaScript.
Coggle requires JavaScript to display documents.
PANDAS IN 10 MINS (VIEWING DATA (df.head() first 5 row, df.tail() last 5…
PANDAS IN 10 MINS
VIEWING DATA
df.head() first 5 row
df.tail() last 5 row
df.index display index
df.columns display columns
df.values display values
df.T Transpose data
df.sort_index(axis=1, ascending=False)
df.sort_values(by='B')
OPERATIONS
Stats
Apply
Histogramming
String Methods
TIME SERIES
Time zone represnation
convert to another time zone
convert between time span
Converting between period and timestamp
CATEGORICALS
Convert the raw grades to a categorical data type
Rename the categories to more meaningful names
Sorting is per order
Grouping by a categorical column shows also empty categories
GETTING DATA IN/OUT
CSV
HDF5
Excel
Gotchas
MISSING DATA
To drop any rows that have missing data
Filling missing data
to get boolean mask where values are nan
MERGE
concat
Join
Append
GROUPING
Splitting
the data into groups based on some criteria
Applying
a function to each group independently
Combining
the results into a data structure
OBJECT CREATION
Create Series
conclusion: Series is Data frame with one column
Create Dataframe
conclusion:
Dataframe is groups of series
Dataframe when taking one index in series all will as it
Dataframe taking a 2dim array or more, index, and columns
There is special index like date_range
SELECTION
Getting
Selection by Label
Selection by Position
Boolean Indexing
setting
Setting a new column by indexes with new series
Setting values by label
Setting values by position
Setting by assigning with a numpy array
where operation with setting
RESHAPING
Stack
Pivot Tables
PLOTTING