pandas-jalali
Package for converting dates from Gregorian to A Persian Date (aka: Jalali Calendar) and back.
This package is port of package khayyam to use with Pandas dataframes.
Installation
To install from package manager:
pip install pandas-jalali
Usage
To convert from Jalali dates to Gregorian:
import pandas as pd
from pandas_jalali.converter import get_gregorian_date_from_jalali_date
df = pd.DataFrame([
[1346, 1, 1],
[1346, 10, 20]
], columns=['year', 'month', 'day'])
df['year_gregorian'], df['month_gregorian'], df['day_gregorian'] = get_gregorian_date_from_jalali_date(df['year'], df['month'], df['day'])
print df
year month day year_gregorian month_gregorian day_gregorian 0 1346.0 1.0 1.0 1967.0 3.0 21.0 1 1346.0 10.0 20.0 1968.0 1.0 10.0
To convert from Gregorian dates to Jalali: Not yet implemented
Tests
At first make sure that you are in virtualenv.
Install all dependencies:
make setup
To run tests:
make test
License
Metadata
Release files for pandas-jalali 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pandas-jalali-0.1.2.tar.gz | 4.6 kB | Without provenance | Details |
Release files / pandas-jalali-0.1.2.tar.gz
| Download URL | pandas-jalali-0.1.2.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ee0c0ff79f06dee8659048b4b0f77bbe5cd81075941ee02428bed96f7fc1cef2
|
|
BLAKE2b-256 checksum How to use checksums |
cca1d41265b0209deb7eb66939a55a3f6857ec62e8310fcb4f63e427260fc9f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pandas-jalali 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.