semvec/pypi-packages huggingface dataset:
delta-hydrologist 0.1.1
Advanced Delta-Lake related tooling based on Apache Spark
License: MIT
Requires Python: >=3.7

# Hydro

Hydro is a collection of Apache Spark and Linux Foundation Delta Lake related tooling.

## Usage

### DeltaTable full schema

Sometimes you need to get a delta table's fields. All of them.

Spark lets you do this, but only gives you the top-level fields. Real life data is often more complicated and nested.

`hydro.fields` gives us what we need.

```python

data = """
{
    "isbn":"0-942299-79-5",
    "title":"The Society of the Spectacle",
    "author":{
      "first_name":"Guy",
      "last_name":"Debord"
    },
    "published_year":1967,
    "pages":154,
    "language":"French"
}
"""
# write `data` to delta table and define it as `delta_table`
better_fieldnames = hydro.fields(delta_table)
print(better_fieldnames)
```
results in
```python
['author.first_name', 'author.last_name', 'isbn', 'language', 'pages', 'published_year', 'title']
```

which is much better than what Spark gives us.

### DeltaTable detail
You can get high-level information about a Delta Lake table by using the `describe` command. The issue with this is that the command was built for machines, not humans.

Hydro provides a simple wrapper that makes the output more readable for humans:

```python
delta_table = DeltaTable(spark, path)
hydro.detail(delta_table)
```
results in something like
```
{
    'createdAt': datetime.datetime(2023, 1, 4, 16, 0, 35, 328000),
    'description': None,
    'format': 'delta',
    'id': '8f5fa9f2-fd74-49de-afb6-d6e19d219838',
    'lastModified': datetime.datetime(2023, 1, 4, 16, 0, 52, 755000),
    'location': 'proto:/path/to/delta/table',
    'minReaderVersion': 1,
    'minWriterVersion': 2,
    'name': None,
    'numFiles': '1,000',
    'partitionColumns': [],
    'properties': {},
    'size': '523.39 KiB'
}
```

## Contributions

Contributions are welcome.

## Naming

Originally this project was going to be `hydrologist` but that's way too long and pretentious so we shortened to `hydro`.

A hydrologist is a person who studies water and its movement. Delta Lake, Data Lake, Lakehouse => water.

## Philosophy

Minimalism in almost everything.

Break the rules if the rules are not justified.

Openness above all.
numbers-almost-equal 0.11
Checks if 2 numbers are almost equal
License: MIT
Keywords: numbers,equal


# Checks if 2 numbers (int) are almost equal

```python

from numbers_almost_equal import (
are_numbers_equal,
are_numbers_equal_diff_0_00000001,
are_numbers_equal_diff_0_0000001,
are_numbers_equal_diff_0_000001,
are_numbers_equal_diff_0_00001,
are_numbers_equal_diff_0_0001,
are_numbers_equal_diff_0_001,
are_numbers_equal_diff_0_01,
are_numbers_equal_diff_0_1,
are_numbers_equal_diff_10,
are_numbers_equal_diff_100,
are_numbers_equal_diff_1000,
are_numbers_equal_diff_10000,
are_numbers_equal_diff_100000,
are_numbers_equal_diff_1000000,
are_numbers_equal_diff_10000000,
are_numbers_equal_diff_100000000,)

are_numbers_equal_diff_0_1(number1=0.1, number2=0.2)=True
are_numbers_equal_diff_0_1(number1=0.1, number2=2)=False
are_numbers_equal_diff_0_01(number1=0.01, number2=0.02)=True
are_numbers_equal_diff_0_01(number1=0.01, number2=0.2)=False
are_numbers_equal_diff_0_001(number1=0.001, number2=0.002)=True
are_numbers_equal_diff_0_001(number1=0.001, number2=0.02)=False
are_numbers_equal_diff_0_0001(number1=0.0001, number2=0.0002)=True
are_numbers_equal_diff_0_0001(number1=0.0001, number2=0.002)=False
are_numbers_equal_diff_0_00001(number1=0.00001, number2=0.00002)=True
are_numbers_equal_diff_0_00001(number1=0.00001, number2=0.0002)=False
are_numbers_equal_diff_0_000001(number1=0.000001, number2=0.000002)=True
are_numbers_equal_diff_0_000001(number1=0.000001, number2=0.00002)=False
are_numbers_equal_diff_0_0000001(number1=0.0000001, number2=0.0000002)=True
are_numbers_equal_diff_0_0000001(number1=0.0000001, number2=0.000002)=False
are_numbers_equal_diff_0_00000001(number1=0.00000001, number2=0.00000002)=True
are_numbers_equal_diff_0_00000001(number1=0.00000001, number2=0.0000002)=False
are_numbers_equal_diff_10(number1=10, number2=11)=True
are_numbers_equal_diff_10(number1=10, number2=20)=False
are_numbers_equal_diff_100(number1=100, number2=110)=True
are_numbers_equal_diff_100(number1=100, number2=200)=False
are_numbers_equal_diff_1000(number1=1000, number2=1100)=True
are_numbers_equal_diff_1000(number1=1000, number2=2000)=False
are_numbers_equal_diff_10000(number1=10000, number2=11000)=True
are_numbers_equal_diff_10000(number1=10000, number2=20000)=False
are_numbers_equal_diff_100000(number1=100000, number2=110000)=True
are_numbers_equal_diff_100000(number1=100000, number2=200000)=False
are_numbers_equal_diff_1000000(number1=1000000, number2=1100000)=True
are_numbers_equal_diff_1000000(number1=1000000, number2=2000000)=False
are_numbers_equal_diff_10000000(number1=10000000, number2=11000000)=True
are_numbers_equal_diff_10000000(number1=10000000, number2=20000000)=False
are_numbers_equal_diff_100000000(number1=100000000, number2=110000000)=True
are_numbers_equal_diff_100000000(number1=100000000, number2=200000000)=False



```