semvec/pypi-packages huggingface dataset:
datagen-kuma 0.0.2
DataGen is a library for generating test data.
Requires Python: >=3.6
Keywords: data generator datagen_kuma pandas dataframe fake

# DataGen-kuma
DataGen-kuma is a library for generating test data.   
It creates similar data with the same schema based on a Pandas DataFrame.

# How It Works
DataGen-kuma takes a DataFrame as input and generates random test data.   
Internally, it generates statistical metrics for each data type to facilitate data generation.   
Using these metrics, it produces similar data appropriate for each data type.

## Data Classification and Generation
- Numeric: Numeric data. Generates random values using Kernel Density Estimation (KDE) technique. The kernel density function uses gaussian_kde from scipy.stats.
- Category: Categorical data. Measures the frequency of each value and generates values according to these frequencies.
- Datetime: Date data following the ISO-8601 standard. Converts to Pandas Timestamps and generates random values within the given date range.
- Boolean: Boolean data. Measures the frequency of each value and generates values according to these frequencies.
- ETC: All other data types not mentioned above. Generates data by randomly sampling from the given values with replacement.

# Usage
Assuming you have a Pandas DataFrame named df.   
This example generates 100,000 rows of data.   
The generated object allows access to each row through iteration.

```python
from datagen_kuma.datagen import DataGen

datagen = DataGen(df=df, count=100_000)
for idx, row in datagen:
    print(idx, row)
```

To retrieve the generated DataFrame, use the following:
```python
generated_df = datagen.dataframe
```
no-toplevel-code 1.0.0
Wrap and unwrap code to allow for modules without top-level code
Requires Python: >=3.9


# no_toplevel_code

Package to wrap a piece of python code in a function and function call, to avoid running code at the top level of a script.

## Example

E.g., if you have a script that looks like this:

```python
import numpy as np
import matplotlib.pyplot as plt

x = np.linspace(0, 2*np.pi, 100)
y = np.sin(x)

plt.plot(x, y)
plt.show()
```

no_toplevel_code converts it to this:
    
```python
import numpy as np
import matplotlib.pyplot as plt

def _main():
    x = np.linspace(0, 2*np.pi, 100)
    y = np.sin(x)

    plt.plot(x, y)
    plt.show()

_main()
```

## Interface

This package provides two functions: `wrap_code` and `unwrap_code` as well as their equivalent functions
    `wrap_ast` and `unwrap_ast`. The former functions take a string as input, while the latter functions
    take an AST (Abstract Syntax Tree) as input.
monorepo 0.2.0
Import packages and modules from the root of a monorepo
Requires Python: >=3.8

# Import packages and modules from the root of a monorepo

Instructions:

1. First create a file named `.monorepo_root` at the root of your monorepo.
2. Use `monorepo.load_package` (or `monorepo.load_module`) to load packages (or modules) from anywhere in your monorepo.

Example usage for `load_package`:
```python
import monorepo

# The `load_package` function will search up from the current directory for a
# file named `.monorepo_root`, which is used to determine the root directory
# from which to load the package:
monorepo.load_package("pkg1")

# The pkg1 package can be used directly:
from pkg1 import mymodule1

# Also works with sub-packages:
monorepo.load_package("pkg1.pkg2")
from pkg2 import mymodule2


# Also works with renaming packages (useful for invalid package names or for name clashes):
monorepo.load_package("invalid-namge", package_name = "pkg3")
from pkg3 import mymodule3
```

Example usage for `load_module`:
```python
import monorepo

# The `load_module` function will search up from the current directory for a
# file named `.monorepo_root`, which is used to determine the root directory
# from which to load the module:
mymodule = monorepo.load_module("pkg1.module1")
mymodule.my_function()

mymodule2 = monorepo.load_module("pkg1.pkg2.module2")
mymodule2.my_function()
```