a couple of Pandas DataFrame and Series subclasses with extensions to work with units and to deal with column names in eclipse simulator output style.
Project description
simpandas
A couple of Pandas DataFrame and Series subclasses, extended to work with units and to deal with column names following the style of eclipse simulator outputs.
This package is under development and is regularly updated. Back-compatibility is intended to be maintained when possible.
Version: 0.90.7 | Python: ≥3.7 (≥3.8 recommended) | Pandas: 1.3.0 - 2.x
What Contains This Package
It is powered by other packages, like NumPy, seaborn and unyts and further own methods, to be able to deal with tables of quantities and facilitate common manipulations of time-dependent data.
Key Features
- Unit-aware DataFrames and Series: Automatic unit tracking and conversion using unyts
- Pandas 2.x compatible: Works with both pandas 1.x and 2.x
- Enhanced I/O: Read/write Excel, CSV, and JSON files with unit metadata preservation
- Expanded pandas wrapper coverage:
ffill,bfill,pct_change,asfreq,combine_first,isin,compare,swaplevel,align,update,resample, andbetweennow return Sim types where applicable - Time-series utilities: Built-in methods for daily, monthly, yearly aggregations
- Eclipse-style simulator support: Handle column naming conventions from reservoir simulators
- Eclipse/OPM summary round-trip: Read/write
.SMSPEC+.UNSMRYfiles withto_summary/read_summaryand optionalOPMorECLIPSEnaming style
Installation
To install from pypi.org:
pip install simpandas
To upgrade to the latest version:
pip install --upgrade simpandas
Requirements
- pandas ≥1.3.0, <3.0.0
- numpy
- matplotlib
- seaborn
- unyts ≥1.0.0
- openpyxl (for Excel support)
- xlsxwriter (for Excel writing)
- packaging (for version detection)
Quick Start
from simpandas import SimDataFrame, SimSeries, read_csv, read_json
# Create a DataFrame with units
df = SimDataFrame(
{'velocity': [1, 2, 3], 'temperature': [25, 30, 35]},
units={'velocity': 'm/s', 'temperature': 'degC'}
)
# Units are preserved through operations
result = df * 2
print(df.get_units()) # Access unit information
# Read CSV/JSON with units
df = read_csv('data.csv', units=0) # units in row 0 after the header
df = read_json('data.json') # restores units from SimPandas JSON
Compatibility Notes
Pandas 2.x Support
Version 0.84.0+ is fully compatible with pandas 2.x while maintaining backward compatibility with pandas 1.3.0+. The deprecated .append() method has been replaced with pd.concat() internally.
Python Version
- Minimum: Python 3.7
- Recommended: Python 3.8 or higher
Breaking Changes in v0.84.0
The writters module has been renamed to writers (correcting spelling). For backward compatibility:
# Deprecated (still works with warning):
from simpandas.writters import write_excel
# New (recommended):
from simpandas.writers import write_excel
Maintenance Updates (April 2026)
- Added wrappers for missing pandas methods in
SimBasicsto preserve metadata through more operations. - Added
_SimResampleProxyandresample()support on bothSimDataFrameandSimSeries. - Fixed filter parsing infrastructure by wiring
common.filters.key_to_string(...)correctly fromSimSeries.filter()andSimDataFrame.filter(). - Added regression coverage in
test/test_audit_bugs.pyandtest/test_missing_wrappers.py.
Documentation
For detailed documentation, examples, and API reference, see:
- USER_MANUAL.md - Comprehensive user manual for classes, functions, and modules
- docs/USER_GUIDE.md - Shorter quick-start guide
- DEVELOPER_MANUAL.md - Internal architecture and contributor-focused technical notes
- CONTRIBUTING.md - Contribution workflow and release checklist
- CHANGELOG.md - Version history and migration guides
- WHATS_NEW.md - Highlights for the current release
- simpandas_demo.ipynb - Interactive examples and tutorials
- test/ - Comprehensive test suite with usage examples
API At A Glance
from simpandas import SimDataFrame, SimSeries, read_excel, read_csv, read_json, read_summary, concat
from simpandas.index import SimIndex
from simpandas.writers.xlsx import write_excel
from simpandas.writers.schedule import write_schedule
from simpandas.writers.summary import write_summary
Contributing
Contributions are welcome! Please ensure:
- Code passes all tests:
pytest test/ - Follow existing code style
- Add tests for new features
- Update documentation as needed
Testing
Run the test suite:
cd simpandas
pytest test/ -v
License
See LICENSE file for details.
Author
Martín Carlos Araya martinaraya@gmail.com
Changelog
See CHANGELOG.md for detailed version history.
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
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
File details
Details for the file simpandas-0.90.7.tar.gz.
File metadata
- Download URL: simpandas-0.90.7.tar.gz
- Upload date:
- Size: 211.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80118b27f1c263d36f395acbd82f364806e45c4abda0fa1fb9745c66ae1d7931
|
|
| MD5 |
b8bb8959ec6a7028f70f34ab1c2931d4
|
|
| BLAKE2b-256 |
9a03610ddf7d9b1052891470b26eddf92eb639d9c885683fa7815162a19fec9c
|
File details
Details for the file simpandas-0.90.7-py3-none-any.whl.
File metadata
- Download URL: simpandas-0.90.7-py3-none-any.whl
- Upload date:
- Size: 194.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7bd4cbd56011785bbbacff335c6b1c7c3fd9204960d007ddb3f08c011f873b2a
|
|
| MD5 |
da50dceeb130f82ba5f2c6f9f20faaf4
|
|
| BLAKE2b-256 |
fd1bf380483b4f243eec7ff8b73787023664cb9c042a5766e6f1c6708d08e970
|