A module to simplify reading pandas dataframes
Project description
nercardata
A Python package for querying and processing sensor data from the Northeastern Electric Racing PostgreSQL database.
Installation
pip install nercardata
Setup
Create a .env file in your project root with the database connection string:
DATABASE_URL=your_database_url_here
Ask the team for the connection string if you don't have it.
Usage
from nercardata import DataLoader
# Fetch cleaned sensor data — returns a DataFrame, unit, and sensor name
df, unit, name = DataLoader.query_builder(
sensor='DTI/Power/AC_Current',
start_time='2025-06-08 15:17:09.00',
end_time='2025-06-08 15:17:23.00'
)
Available Methods
DataLoader.query_builder(sensor, start_time, end_time)
The main method. Fetches sensor data, cleans it, and returns a tuple of (DataFrame, unit, sensor_name). The DataFrame contains time (seconds from start) and values (float) columns.
DataLoader.get_data(sensor, table, start_time, end_time)
Raw database query. Use table='data' for time-series readings or table='data_type' for sensor metadata.
DataLoader.data_cleaner(dataframe, dropping, time, format_list_to_float)
Cleans a DataFrame by dropping columns, normalizing timestamps to elapsed seconds, and converting list-wrapped values to floats.
DataLoader.time_calls(func)
A decorator that prints execution time of any function.
Dependencies
psycopg2— PostgreSQL adapterpandas— data manipulationpython-dotenv— environment variable loading
License
MIT
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 nercardata-0.0.2.tar.gz.
File metadata
- Download URL: nercardata-0.0.2.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77b9dacef4b4f45a2d8a48af3990c623ff264bc5327b2b48e71b62d5fb9adcd5
|
|
| MD5 |
da05d311fc8f69c5e65e4697ca1dc9b7
|
|
| BLAKE2b-256 |
a5b82ef99d21dafd03a3512f0a4782b24f3b617b40dcb60311abe230031e2536
|
File details
Details for the file nercardata-0.0.2-py3-none-any.whl.
File metadata
- Download URL: nercardata-0.0.2-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2321afa344955d69d361712e300ff1b26959a6ee1c57974e0f8e89eae4f5a20
|
|
| MD5 |
ca68b224286e2ef5959906ca99732c2e
|
|
| BLAKE2b-256 |
93a460474e55d5b50dee77ad7406b7fb6eefc68807c4c1fdec061db07bd29a72
|