diff --git a/README.md b/README.md index 83d9755..a967e96 100644 --- a/README.md +++ b/README.md @@ -3352,15 +3352,16 @@ c 6 7 #### DataFrame — Encode, Decode: ```python - = pd.read_json/html('') # Run `$ pip3 install beautifulsoup4 lxml`. - = pd.read_csv('') # `header/index_col/dtype/usecols/…=`. - = pd.read_pickle/excel('') # Use `sheet_name=None` to get all Excel sheets. - = pd.read_sql('', ) # SQLite3/SQLAlchemy connection (see #SQLite). + = pd.read_json/pickle() # Also accepts io.StringIO/BytesIO(). + = pd.read_csv() # `header/index_col/dtype/usecols/…=`. + = pd.read_excel() # `sheet_name=None` returns dict of all sheets. + = pd.read_sql('
', ) # SQLite3/SQLAlchemy connection (see #SQLite). + = pd.read_html() # Run `$ pip3 install beautifulsoup4 lxml`. ``` ```python = .to_dict('d/l/s/…') # Returns columns as dicts, lists or series. - = .to_json/html/csv/latex() # Saves output to a file if path is passed. + = .to_json/csv/html/latex() # Saves output to a file if path is passed. .to_pickle/excel() # Run `$ pip3 install "pandas[excel]" odfpy`. .to_sql('', ) # Also `if_exists='fail/replace/append'`. ``` @@ -3373,8 +3374,7 @@ c 6 7 ```python = .groupby(col_key/s) # Splits DF into groups based on passed column. - = .apply() # Maps each group. Func can return DF, S or el. - = .filter() # Drops a group if function returns False. + = .apply/filter() # Filter drops a group if func returns False. = .get_group() # Selects a group by grouping column's value. = .size() # S of group sizes. Same keys as get_group(). = [col_key] # Single column GB. All operations return S. diff --git a/index.html b/index.html index ef1b7e3..0e6b6a1 100644 --- a/index.html +++ b/index.html @@ -55,7 +55,7 @@
- +
@@ -2729,14 +2729,15 @@ c 6 7 <DF> = <DF>.pivot_table(index=col_key/s) # `columns=key/s, values=key/s, aggfunc='mean'`. -

DataFrame — Encode, Decode:

<DF> = pd.read_json/html('<str/path/url>')     # Run `$ pip3 install beautifulsoup4 lxml`.
-<DF> = pd.read_csv('<path/url>')               # `header/index_col/dtype/usecols/…=<obj>`.
-<DF> = pd.read_pickle/excel('<path/url>')      # Use `sheet_name=None` to get all Excel sheets.
-<DF> = pd.read_sql('<table/query>', <conn.>)   # SQLite3/SQLAlchemy connection (see #SQLite).
+

DataFrame — Encode, Decode:

<DF>   = pd.read_json/pickle(<path/url/file>)  # Also accepts io.StringIO/BytesIO(<str/bytes>).
+<DF>   = pd.read_csv(<path/url/file>)          # `header/index_col/dtype/usecols/…=<obj>`.
+<DF>   = pd.read_excel(<path/url/file>)        # `sheet_name=None` returns dict of all sheets.
+<DF>   = pd.read_sql('<table/query>', <conn>)  # SQLite3/SQLAlchemy connection (see #SQLite).
+<list> = pd.read_html(<path/url/file>)         # Run `$ pip3 install beautifulsoup4 lxml`.
 
<dict> = <DF>.to_dict('d/l/s/…')               # Returns columns as dicts, lists or series.
-<str>  = <DF>.to_json/html/csv/latex()         # Saves output to a file if path is passed.
+<str>  = <DF>.to_json/csv/html/latex()         # Saves output to a file if path is passed.
 <DF>.to_pickle/excel(<path>)                   # Run `$ pip3 install "pandas[excel]" odfpy`.
 <DF>.to_sql('<table_name>', <connection>)      # Also `if_exists='fail/replace/append'`.
 
@@ -2746,8 +2747,7 @@ c 6 7
  • To get specific attributes from a series of Timestamps use '<S>.dt.year/date/…'.
  • GroupBy

    Object that groups together rows of a dataframe based on the value of the passed column.

    <GB> = <DF>.groupby(col_key/s)                 # Splits DF into groups based on passed column.
    -<DF> = <GB>.apply(<func>)                      # Maps each group. Func can return DF, S or el.
    -<DF> = <GB>.filter(<func>)                     # Drops a group if function returns False.
    +<DF> = <GB>.apply/filter(<func>)               # Filter drops a group if func returns False.
     <DF> = <GB>.get_group(<el>)                    # Selects a group by grouping column's value.
     <S>  = <GB>.size()                             # S of group sizes. Same keys as get_group().
     <GB> = <GB>[col_key]                           # Single column GB. All operations return S.
    @@ -2924,7 +2924,7 @@ $ deactivate                # Deactivates the active
      
     
       
    - +