diff --git a/README.md b/README.md index cc8d818..cba427e 100644 --- a/README.md +++ b/README.md @@ -3157,7 +3157,7 @@ Name: a, dtype: int64 ``` ```python - = .append() # Or: pd.concat() + = pd.concat() # Concats multiple Series into one long Series. = .combine_first() # Adds items that are not yet present. .update() # Updates items that are already present. ``` @@ -3198,6 +3198,7 @@ y 2 | sr.transform(…) | y 2 | y 2 | y 2 | +-----------------+-------------+-------------+---------------+ ``` +* **Methods ffill(), interpolate() and fillna() accept argument 'inplace' that defaults to False.** * **Last result has a hierarchical index. Use `'[key_1, key_2]'` to get its values.** ### DataFrame @@ -3235,9 +3236,9 @@ b 3 4 ```python = .set_index(column_key) # Replaces row keys with values from a column. - = .reset_index() # Moves row keys to a column named index. - = .sort_index(ascending=True) # Sorts rows by row keys. - = .sort_values(column_key/s) # Sorts rows by the passed column/s. + = .reset_index(drop=False) # Moves row keys to a column named index. + = .sort_index(ascending=True) # Sorts rows by row keys. Use `axis=1` for cols. + = .sort_values(column_key/s) # Sorts rows by the passed column/s. Same. ``` #### DataFrame — Merge, Join, Concat: @@ -3323,7 +3324,7 @@ b 3 4 #### DataFrame — Plot, Encode, Decode: ```python -.plot.line/bar/hist/scatter/box() # Also: `x=column_key, y=column_key/s`. +.plot.line/area/bar/hist/scatter/box() # Also: `x=column_key, y=column_key/s`. plt.show() # Displays the plot. Also plt.savefig(). ``` diff --git a/index.html b/index.html index c28a279..5298734 100644 --- a/index.html +++ b/index.html @@ -54,7 +54,7 @@
- +
@@ -2578,7 +2578,7 @@ Name: a, dtype: int64
<Sr> = <Sr> ><== <el/Sr>                       # Returns a Series of bools.
 <Sr> = <Sr> +-*/ <el/Sr>                       # Items with non-matching keys get value NaN.
 
-
<Sr> = <Sr>.append(<Sr>)                       # Or: pd.concat(<coll_of_Sr>)
+
<Sr> = pd.concat(<coll_of_Sr>)                 # Concats multiple Series into one long Series.
 <Sr> = <Sr>.combine_first(<Sr>)                # Adds items that are not yet present.
 <Sr>.update(<Sr>)                              # Updates items that are already present.
 
@@ -2611,6 +2611,7 @@ y 2
    +
  • Methods ffill(), interpolate() and fillna() accept argument 'inplace' that defaults to False.
  • Last result has a hierarchical index. Use '<Sr>[key_1, key_2]' to get its values.

DataFrame

Table with labeled rows and columns.

>>> DataFrame([[1, 2], [3, 4]], index=['a', 'b'], columns=['x', 'y'])
@@ -2636,9 +2637,9 @@ b  3  4
 <DF>    = <DF> +-*/ <el/Sr/DF>                 # Items with non-matching keys get value NaN.
 
<DF>    = <DF>.set_index(column_key)           # Replaces row keys with values from a column.
-<DF>    = <DF>.reset_index()                   # Moves row keys to a column named index.
-<DF>    = <DF>.sort_index(ascending=True)      # Sorts rows by row keys.
-<DF>    = <DF>.sort_values(column_key/s)       # Sorts rows by the passed column/s.
+<DF>    = <DF>.reset_index(drop=False)         # Moves row keys to a column named index.
+<DF>    = <DF>.sort_index(ascending=True)      # Sorts rows by row keys. Use `axis=1` for cols.
+<DF>    = <DF>.sort_values(column_key/s)       # Sorts rows by the passed column/s. Same.
 

DataFrame — Merge, Join, Concat:

>>> l = DataFrame([[1, 2], [3, 4]], index=['a', 'b'], columns=['x', 'y'])
    x  y
@@ -2714,7 +2715,7 @@ b  3  4
 
  • Use '<DF>[col_key_1, col_key_2][row_key]' to get the fifth result's values.
-

DataFrame — Plot, Encode, Decode:

<DF>.plot.line/bar/hist/scatter/box()          # Also: `x=column_key, y=column_key/s`.
+

DataFrame — Plot, Encode, Decode:

<DF>.plot.line/area/bar/hist/scatter/box()     # Also: `x=column_key, y=column_key/s`.
 plt.show()                                     # Displays the plot. Also plt.savefig(<path>).
 
@@ -2724,7 +2725,7 @@ plt.show() # Disp <DF> = pd.read_clipboard() # Reads a copied table from the clipboard.
<dict> = <DF>.to_dict(['d/l/s/…'])             # Returns columns as dicts, lists or series.
-<str>  = <DF>.to_json/html/csv([<path>])       # Also to_markdown/latex([<path>]).
+<str>  = <DF>.to_json/html/csv([<path>])       # Also <DF>.to_markdown/latex([<path>]).
 <DF>.to_pickle/excel(<path>)                   # Run `$ pip3 install openpyxl` for xlsx files.
 <DF>.to_sql('<table_name>', <connection>)      # Accepts SQLite3 or SQLAlchemy connection.
 
@@ -2919,7 +2920,7 @@ $ pyinstaller script.py --add-data '<path>:.'