Metadata-Version: 2.1
Name: pdpatch
Version: 0.1.1
Summary: Methods for pandas DataFrame and Series.
Home-page: https://github.com/asappinc/pdpatch/tree/main/
Author: Andres Babino
Author-email: ababino@asapp.com
License: Apache Software License 2.0
Keywords: pandas patch
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: Apache Software License
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Provides-Extra: dev
License-File: LICENSE

pdpatch
================

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

## Install

`pip install pdpatch`

## How to use

``` python
from pdpatch.all import *
```

### Interactive Method `.less()`

![Alt Text](less15_360.gif)

### Automatically Rename snake_case columns in `plotly.express`

``` python
import pandas as pd
df = pd.DataFrame({'time__s__': range(10), 'position__m__': range(10)})
px.scatter(df, x='time__s__', y='position__m__').show('png')
```

![](index_files/figure-gfm/cell-4-output-1.png)

### Shorter methods

`df.rename(columns={'col_1': 'new_name'})`-\>`df.renamec({'col_1': 'new_name'})`

``` python
df.renamec({'col_1': 'new_name'})
```

<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>new_name</th>
      <th>col_2</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>100</td>
      <td>a</td>
    </tr>
    <tr>
      <th>1</th>
      <td>101</td>
      <td>b</td>
    </tr>
    <tr>
      <th>2</th>
      <td>102</td>
      <td>c</td>
    </tr>
    <tr>
      <th>3</th>
      <td>103</td>
      <td>d</td>
    </tr>
    <tr>
      <th>4</th>
      <td>104</td>
      <td>e</td>
    </tr>
  </tbody>
</table>
</div>

### Functions as methods

``` python
df.len()
```

    5

### New methods

``` python
df.col_1.minmax
```

    (100, 104)

### Utility functions

``` python
df = dummydf()
df
```

<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>col_1</th>
      <th>col_2</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>100</td>
      <td>a</td>
    </tr>
    <tr>
      <th>1</th>
      <td>101</td>
      <td>b</td>
    </tr>
    <tr>
      <th>2</th>
      <td>102</td>
      <td>c</td>
    </tr>
    <tr>
      <th>3</th>
      <td>103</td>
      <td>d</td>
    </tr>
    <tr>
      <th>4</th>
      <td>104</td>
      <td>e</td>
    </tr>
  </tbody>
</table>
</div>
