Common statistics¶
Extract statistics from a Panda dataframe column
Parameters¶
- magstr
Name of the column from which to get stats. Can be a list for extracting stats from multilple columns.
- drrstr, optional
Column name representing the directions.
- args: dict
Dictionnary with the folowing keys:
- minimum occurrence (main direction) [%]: int
Use to calculate the main direction. Main direction is when occurence>= Minimum occurrence. Default is 15
- folder out: str
Path to save the output
- time blocking: str
- if
time blocking=='yearly', Statistics will be calculated for the whole timeserie
- if
time blocking=='south hemisphere(Summer/Winter)', Statistics will be calculated for South hemisphere summer and winter seasons
- if
time blocking=='south hemisphere 4 seasons', Statistics will be calculated for each South hemisphere seasons
- if
time blocking=='north hemishere(Summer/Winter)', Statistics will be calculated for North hemisphere summer and winter seasons
- if
time blocking=='north hemisphere 4 seasons', Statistics will be calculated for each North hemisphere seasons
- if
time blocking=='north hemisphere moosoon(SW,NE,Hot season)', Statistics will be calculated for the North hemisphere moonsoon seasons
- if
- stats: str
string containing the name of the stats to do (must be numpy function) exemple:
n min max mean std [1,5,10,50,90,95,99], where:n is for number of sample
Put exceedence values in
[]
Examples:¶
>>> df=tf['test1']['dataframe'].Statistics.common_stats(mag='U',drr='drr',args={'time blocking':'Yearly'})
>>>
Outputs:¶
N |
min |
max |
mean |
std |
P1 |
P90 |
Main Direction |
|
|---|---|---|---|---|---|---|---|---|
June |
||||||||
July |
||||||||
Winter |
||||||||
Total |