Hopsworks User Defined Functions - Common utilities for feature engineering
Project description
HUDF - Hopsworks User Defined Functions
Common utilities and functions for feature engineering in Hopsworks.
Installation
pip install hudf
Quick Start
Time
- df: Input DataFrame
- columns: Column(s) to convert
- unit: Input unit ('us' for microseconds, 'ms' for milliseconds, 's' for seconds)
- inplace: Whether to modify DataFrame in place
- tz: Timezone for the output datetime (default UTC)
import pandas as pd
from hudf.time import to_epoch, from_epoch
# Convert to epoch
df = pd.DataFrame({
'timestamp': pd.date_range('2024-01-01', periods=3),
'str_date': ['2024-01-01', '2024-01-02', '2024-01-03']
})
# Convert both columns to seconds since epoch
df = to_epoch(df, ['timestamp', 'str_date'], unit='s')
# Convert back to datetime
df = from_epoch(df, ['timestamp', 'str_date'], unit='s', tz='Europe/London')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hudf-0.0.2.tar.gz
(2.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
hudf-0.0.2-py3-none-any.whl
(2.3 kB
view details)
File details
Details for the file hudf-0.0.2.tar.gz.
File metadata
- Download URL: hudf-0.0.2.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d46e895f772e07812dcd19a73363bcd86b4f32ceb38c9de8277acc108446885b
|
|
| MD5 |
7941c2fd8c3c7a2293cd219f653778a4
|
|
| BLAKE2b-256 |
bc1046b062adb7ce845cdf13b10872237f5fa63cf8c7393b0126195f76b21122
|
File details
Details for the file hudf-0.0.2-py3-none-any.whl.
File metadata
- Download URL: hudf-0.0.2-py3-none-any.whl
- Upload date:
- Size: 2.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eefb33747ee6eac5a01643478b129dd28259343710942eed6d3dace499b01472
|
|
| MD5 |
82451dcc891d718b23efd33296c6077b
|
|
| BLAKE2b-256 |
77e3dc8da1a75d814a8e6c7f26cfc7ad45fd878a31b3ec007513c1b0d2b2e4b2
|