https://github.com/hansmissenheim/ncaadb
📅 Handle DB save files from EA Sports NCAA games
https://github.com/hansmissenheim/ncaadb
cfb ncaa python
Last synced: 4 months ago
JSON representation
📅 Handle DB save files from EA Sports NCAA games
- Host: GitHub
- URL: https://github.com/hansmissenheim/ncaadb
- Owner: hansmissenheim
- License: gpl-3.0
- Created: 2023-06-06T20:54:05.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-20T03:34:31.000Z (almost 2 years ago)
- Last Synced: 2024-06-20T15:25:18.658Z (almost 2 years ago)
- Topics: cfb, ncaa, python
- Language: Python
- Homepage:
- Size: 1.81 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ncaadb
Ncaadb is a Python package created for the handling of DB save files from EA Sports NCAA games.
## Installation
Ncaadb is published to PyPI and is available using `pip` or any other Python package manager.
pip install ncaadb
## Usage
The data from a DB file is loaded into a `File` by opening a file stream and sending it into the `read_db` function.
``` python
import ncaadb
with open("saves/USR-DATA", "rb") as f:
db_data = ncaadb.read_db(f)
```
The contents of a table can then be accessed using the indexer operator, `[]`, and the table's name as the index. This will return the tabular data as a `pandas.DataFrame`. The tabular data can be set using the same method.
``` python
player_data = db_data["PLAY"]
modified_player_data = player_data.replace(0, 1)
db_data["PLAY"] = modified_player_data
```