semvec/pypi-packages huggingface dataset:
pandas-lookup 0.1.4
pandas-lookup adds remote lookup tables to a Pandas DataFrame.
License: MIT

pandas-lookup
=============

A port of [agate-lookup](https://github.com/wireservice/agate-lookup) that provides the lookup in Pandas DataFrames instead of Agate Tables.

This uses lookup tables from Wireservice's [lookup](https://github.com/wireservice/lookup) project.

Installation
------------

```
pip install pandas-lookup
```

Look up a column from a lookup table
------------------------------------

When the key in your data is the same as the key in the lookup table:

```
>>> import pandaslookup
>>> import pandas as pd
>>> df = pd.DataFrame({'usps': ['CT', 'NY', 'NJ']})
>>> print(df)
  state_abbr
0         CT
1         NY
2         NJ
>>> df.pipe(pandaslookup.lookup, 'usps', 'state')
  usps        state
0   CT  Connecticut
1   NY     New York
2   NJ   New Jersey
```
When the key in your data is different than the key in the lookup table:

```
>>> import pandaslookup
>>> import pandas as pd
>>> df = pd.DataFrame({'state_abbr': ['CT', 'NY', 'NJ']})
>>> print(df)
  state_abbr
0         CT
1         NY
2         NJ
>>> df.pipe(pandaslookup.lookup, 'state_abbr', 'state', lookup_key='usps')
  usps        state
0   CT  Connecticut
1   NY     New York
2   NJ   New Jersey
```

Retrieve a table without joining
--------------------------------

```
>>> import pandaslookup
>>> table = pandaslookup.from_lookup(['usps', 'year'], 'population')
>>> print(table.head())
  usps  year  population
0   AL  1970     3454557
1   AL  1971     3497349
2   AL  1972     3540003
3   AL  1973     3580759
4   AL  1974     3627778
```

Installing for development
--------------------------

```
pipenv install --dev -e .
```

Running tests
-------------

```
pipenv run python -m unittest
```

Prior art
---------

- [harbolkn/pandas-lookup](https://github.com/harbolkn/pandas-lookup): This is the same idea, but it relies on the `agate-lookup` package, which createds a needless dependency on Agate. Also, I don't think I like monkey-patching `DataFrame`.
objopt 0.2.0
Object oriented optimization
License: MIT
Keywords: optimization


## objopt
This library provides object oriented optimization. This allows...

1. using theoretic values (such as the strong convexity parameter)
2. object-oriented definitions, both for models and optimization algorithms. This allows...
    * interacting with the optimization as an object. Want to compute some
      value partway through? Want to change the values as time goes on?
    * getting results intermediately (or in the presence of a keyboard
      interrept)
    * having callbacks, etc

A typical example:

``` python
def get_stats():
    # ...

model = Model()
opt = SGD(model.loss)

data = []
for _ in range(10):
    opt.step(steps=10)
    data += [get_stats(model)]
```
kubeconf 0.0.5
Lightweight Python module for creating, manipulating, and editing kubeconfig files
License: MIT


# kubeconf

**Lightweight Python module for creating, manipulating, and editing kubeconfig files**

*Why not use or wrap `kubectl config`?*
`kubectl config` is great and writing a Python wrapper is a fine solution. However, `kubectl config` is quite limited in functionality. I wanted more control over my kubernetes config. *kubeconfig* gives me that control. It doesn't use *kubectl* at all. Rather, it reads, edits, and writes config files entirely on its own. 

## Getting starting

Install this package using pip:
```
pip install kubeconf
```

**Basic Usage**

```python
from kubeconf import KubeConf

k = KubeConf(path='path/to/config')

# Open the file
k.open()

# Add a cluster
k.add_cluster(
    name='mycluster',
    server='...',
    certificate_authority_data='...',
)

# Add a user for that cluster
k.add_user(
    user='me'
)

# Add a context to map the user to the cluster
k.add_context(
    name='mycontext',
    cluster_name='mycluster',
    user_name='me'
)

# Commit change to the file.
k.close()
```

## Developing

Download and install this repo from source, and move into the base directory.
```
git clone https://github.com/Zsailer/kubeconf
cd kubeconf
```
If you use [pipenv](https://pipenv.readthedocs.io/en/latest/), you can install a developement version:
```
pipenv install --dev
``` 

Otherwise you can install a development version using pip
```
pip install -e .
```

## Licensing

The code in this project is licensed under MIT license.