diff --git a/README.md b/README.md index 9c863de..c2c1af1 100644 --- a/README.md +++ b/README.md @@ -3165,7 +3165,6 @@ Name: a, dtype: int64 ```python = pd.Series() # Uses list's indices for 'index'. = pd.Series() # Uses dictionary's keys for 'index'. - = pd.concat() # Also .combine_first(), .update(). ``` ```python @@ -3186,8 +3185,9 @@ Name: a, dtype: int64 ``` ```python - = .value_counts(normalize=False) # Returns S of unique values and their counts. - = .str.strip/lower/contains/replace() # Processes strings. For dates see File Formats. + = .head/describe/copy/sort_values() # Also .unique/value_counts/round/dropna(). + = .str.strip/lower/contains/replace() # Also split().str[] and split().explode(). + = .dt.year/month/day/hour # Use pd.to_datetime() to get S of dates. ``` ```python @@ -3222,7 +3222,7 @@ Name: a, dtype: int64 | | y 2.0 | y 2.0 | y 2.0 | +--------------+-------------+-------------+---------------+ ``` -* **Methods ffill(), interpolate(), fillna() and dropna() accept `'inplace=True'`.** +* **Methods sort_values(), dropna(), ffill(), interpolate() and fillna() accept `'inplace=True'`.** * **Agg() and transform() pass a Series to a function if it raises Type/Val/AttrError on a scalar.** * **Last result has a multi-index. Use `'[key_1, key_2]'` to get its values.** diff --git a/index.html b/index.html index a02afbe..c5ce500 100644 --- a/index.html +++ b/index.html @@ -55,7 +55,7 @@
- +
@@ -2582,7 +2582,6 @@ Name: a, dtype: int64
<S>  = pd.Series(<list>)                       # Uses list's indices for 'index'.
 <S>  = pd.Series(<dict>)                       # Uses dictionary's keys for 'index'.
-<S>  = pd.concat(<coll_of_S>)                  # Also <S>.combine_first(<S>), <S>.update(<S>).
 
<el> = <S>.loc[key]                            # Or: <S>.iloc[i]
 <S>  = <S>.loc[coll_of_keys]                   # Or: <S>.iloc[coll_of_i]
@@ -2595,8 +2594,9 @@ Name: a, dtype: int64
 
<S>  = <S> > <el/S>                            # Returns S of bools. For logic use &, |, ~.
 <S>  = <S> + <el/S>                            # Items with non-matching keys get value NaN.
 
-
<S>  = <S>.value_counts(normalize=False)       # Returns S of unique values and their counts.
-<S>  = <S>.str.strip/lower/contains/replace()  # Processes strings. For dates see File Formats.
+
<S>  = <S>.head/describe/copy/sort_values()    # Also <S>.unique/value_counts/round/dropna().
+<S>  = <S>.str.strip/lower/contains/replace()  # Also split().str[<int>] and split().explode().
+<S>  = <S>.dt.year/month/day/hour              # Use pd.to_datetime(<S>) to get S of dates.
 
<S>.plot.line/area/bar/pie/hist()              # Generates a plot. `plt.show()` displays it.
 
@@ -2627,7 +2627,7 @@ Name: a, dtype: int64
    -
  • Methods ffill(), interpolate(), fillna() and dropna() accept 'inplace=True'.
  • +
  • Methods sort_values(), dropna(), ffill(), interpolate() and fillna() accept 'inplace=True'.
  • Agg() and transform() pass a Series to a function if it raises Type/Val/AttrError on a scalar.
  • Last result has a multi-index. Use '<S>[key_1, key_2]' to get its values.
@@ -2932,7 +2932,7 @@ $ deactivate # Deactivates the active diff --git a/parse.js b/parse.js index 6129c8c..01e4be1 100755 --- a/parse.js +++ b/parse.js @@ -591,6 +591,72 @@ const DIAGRAM_13_B = "┃ │ y 2.0 │ y 2.0 │ y 2.0 ┃\n" + "┗━━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┛\n"; +const DIAGRAM_13_BB = + "┏━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┓\n" + + "┃ │ 'mean' │ ['mean'] │ {'m': 'mean'} ┃\n" + + "┠────────────────┼─────────────┼─────────────┼───────────────┨\n" + + "┃ s.apply/agg(…) │ 1.5 │ mean 1.5 │ m 1.5 ┃\n" + + "┗━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┛\n" + + "\n" + + "┏━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┓\n" + + "┃ │ 'rank' │ ['rank'] │ {'r': 'rank'} ┃\n" + + "┠────────────────┼─────────────┼─────────────┼───────────────┨\n" + + "┃ s.apply/agg(…) │ │ rank │ ┃\n" + + "┃ │ x 1.0 │ x 1.0 │ r x 1.0 ┃\n" + + "┃ │ y 2.0 │ y 2.0 │ y 2.0 ┃\n" + + "┗━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┛\n"; + +const DIAGRAM_13_XXX = + "┏━━━━━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━┓\n" + + "┃ │ 'sum' │ ['sum', 'max'] │ 'rank' │ ['rank', 'diff'] ┃\n" + + "┠────────────────┼───────────┼────────────────┼───────────┼──────────────────┨\n" + + "┃ s.apply/agg(…) │ 3 │ sum 3 │ x 1.0 │ rank diff ┃\n" + + "┃ │ │ max 2 │ y 2.0 │ x 1.0 NaN ┃\n" + + "┃ │ │ Name: a │ Name: a │ y 2.0 1.0 ┃\n" + + "┗━━━━━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┛\n"; + +const DIAGRAM_13_XX = + "┏━━━━━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┓\n" + + "┃ │ 'sum' │ 'rank' │ ['sum', 'max'] ┃\n" + + "┠────────────────┼───────────┼───────────┼────────────────┨\n" + + "┃ s.apply/agg(…) │ 3 │ x 1.0 │ sum 3 ┃\n" + + "┃ │ │ y 2.0 │ max 2 ┃\n" + + "┃ │ │ Name: a │ Name: a ┃\n" + + "┗━━━━━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┛\n"; + +const DIAGRAM_13_X = + "┏━━━━━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━┓\n" + + "┃ │ 'sum' │ 'rank' │ ['sum', 'max'] │ ['rank', 'diff'] ┃\n" + + "┠────────────────┼───────────┼───────────┼────────────────┼──────────────────┨\n" + + "┃ s.apply/agg(…) │ 3 │ x 1.0 │ sum 3 │ rank diff ┃\n" + + "┃ │ │ y 2.0 │ max 2 │ x 1.0 NaN ┃\n" + + "┃ │ │ Name: a │ Name: a │ y 2.0 1.0 ┃\n" + + "┗━━━━━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┛\n"; + +const DIAGRAM_13_Y = + "┏━━━━━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━┓\n" + + "┃ │ 'sum' │ 'rank' │ ['sum'] │ ['rank'] ┃\n" + + "┠────────────────┼───────────┼───────────┼───────────┼───────────┨\n" + + "┃ s.apply/agg(…) │ 3 │ x 1.0 │ sum 3 │ rank ┃\n" + + "┃ │ │ y 2.0 │ Name: a │ x 1.0 ┃\n" + + "┃ │ │ Name: a │ │ y 2.0 ┃\n" + + "┗━━━━━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━┛\n"; + +const DIAGRAM_13_BBB = + "┏━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┓\n" + + "┃ │ 'sum' │ ['sum'] │ {'s': 'sum'} ┃\n" + + "┠────────────────┼─────────────┼─────────────┼───────────────┨\n" + + "┃ s.apply/agg(…) │ 3 │ sum 3 │ s 3 ┃\n" + + "┗━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┛\n" + + "\n" + + "┏━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┓\n" + + "┃ │ 'rank' │ ['rank'] │ {'r': 'rank'} ┃\n" + + "┠────────────────┼─────────────┼─────────────┼───────────────┨\n" + + "┃ s.apply/agg(…) │ │ rank │ ┃\n" + + "┃ │ x 1.0 │ x 1.0 │ r x 1.0 ┃\n" + + "┃ │ y 2.0 │ y 2.0 │ y 2.0 ┃\n" + + "┗━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┛\n"; + const DIAGRAM_14_A = "| | 'rank' | ['rank'] | {'r': 'rank'} |";