semvec/pypi-packages huggingface dataset:
plastic 0.2.0
An ORM interface that molds itself to your data.
Requires Python: >=3.6

# Plastic ORM
An ORM that molds itself to the data


Currently in beta validation. SQLite is the initial test.
See the `dev/` directory for example usage.


# Quickstart

Here's a quick way to get some data out of a SQLite database file:

```
from plastic.connectors.sqlite import PlasticSqlite
PlasticSqlite._dbInfo = './dev/sqlite-test.db'
class Task(PlasticSqlite): pass
print(Task.find(Task.id[3:]))
# [task(id=4,active=0,title='Uninteresting',description='Not much to say here.'),
#  task(id=5,active=1,title='Very important',description=None)]
```

To change a record you can set it this way:
```
task = Task(id=4)
print(task)
# task(id=4,active=0,title='Uninteresting',description='Not much to say here.')
task.title = "A bit more interesting"
task._commit()
print(Task(id=4))
# task(id=4,active=0,title='A bit more interesting',description='Not much to say here.')
```

> Note: To avoid the need to call `_commit()`, set `_autocommit=True`. 
>   This can be done at the object or class level.
> Also note that for SQLite a commit means _the database file is updated_!

Any column of the table can be referenced as an attribute, and they can also be used as a filter. 
For example, to find the tasks that are still active:
```
print({task.title: task.description 
       for task 
       in Task.find(Task.active[0])})
# {'Skipped': None, 'A bit more interesting': 'Not much to say here.'}
```

Add an entry by instantiating without a bound key:

```
newTask = Task()
newTask.title = "A new task to do"
newTask.active = True
newTask._commit()
print(Task.find(Task.id[5:])) # get tasks after the last added
# [task(id=6,active=1,title='A new task to do',description=None)]
```

Deletion is _not_ yet supported. It wouldn't be hard, but there needs to be some sort of interlocking.
missing-data-navkiran 1.0.4
Handle Missing Data By Either Dropping Rows/Columns, Forward/Backward Filling or Imputing with Mean, Median or Mode
Requires Python: >=3.6
Keywords: command-line,Missing-Data

# Library for Handling Missing Data

```
PROJECT 3, UCS633 - Data Analysis and Visualization
Navkiran Singh  
COE17
Roll number: 101703365
```

Takes two inputs - filename of input csv, intended filename of output csv. 

Two optional arguments - which must be provided together or left out.


Resulting csv is saved with the name you provide. 


## Installation
`pip install missing_data_navkiran`

*Recommended - test in a virtual environment.* 

## Use via command line

Defaults are drop NaN with parameter along = 0 (drops rows containing NaN)

`missing_data_navkiran_cli in.csv out.csv`

Drop rows with NaN
`missing_data_navkiran_cli in.csv out.csv DROP 0` 

Drop columns with NaN
`missing_data_navkiran_cli in.csv out.csv DROP 1`

Forward filling
`missing_data_navkiran_cli in.csv out.csv FILL 0`

Backward filling
`missing_data_navkiran_cli in.csv out.csv FILL 1`

Imputing with mean
`missing_data_navkiran_cli in.csv out.csv IMPUTE 0`

Imputing with median
`missing_data_navkiran_cli in.csv out.csv IMPUTE 1`

Imputing with mode
`missing_data_navkiran_cli in.csv out.csv IMPUTE 2`

First argument after outcli is the input csv filename from which the dataset is extracted. The second argument is for storing the final dataset after processing.

## Use in .py script
```
from missing_data_navkiran import dropval,filler,impute
input_df = pd.read_csv('in.csv')
```
axis = 0
`output_df = dropval(input_df,along=0)`

axis = 1 
`output_df = dropval(input_df,along=1)`

backward-filling
`output_df = filler(input_df,0)`

forward-filling
`output_df = filler(input_df,1)`

Mean
`output_df = impute(input_df,0)`

Median
`output_df = impute(input_df,1)`

Mode
`output_df = impute(input_df,2)`


There are also stand alone functions to fill numerical data and fill categorical data.

```
from missing_data_navkiran import fill_numerical,fill_categorical
fill_numerical(input_df,list_of_numerical_columns)
fill_categorical(input_df,list_of_categorical_columns)
```
lazy-ops 0.2.0
Lazy slicing and transpose operations for h5py and zarr

# lazy_ops

<strong>Lazy transposing and slicing of h5py Datasets and zarr arrays</strong>

## Installation

```bash
$ pip install lazy_ops
```

## Usage:

```python
from lazy_ops import DatasetView

# h5py #
import h5py
dsetview = DatasetView(dataset) # dataset is an instance of h5py.Dataset
view1 = dsetview.lazy_slice[1:40:2,:,0:50:5].lazy_transpose([2,0,1]).lazy_slice[8,5:10]

# zarr #
import zarr
zarrview = DatasetView(zarray) # dataset is an instance of zarr.core.Array
view1 = zview.lazy_slice[1:10:2,:,5:10].lazy_transpose([0,2,1]).lazy_slice[0:3,1:4]

# reading from view on either h5py or zarr
A = view1[:]          # Brackets on DataSetView call the h5py or zarr slicing method, returning the data
B = view1.dsetread()  # same as view1[:]

# iterating on either h5yy or zarr
for ib in view.lazy_iter(axis=1):
    print(ib[0])

```