Skip to main content

A library to read and write AGS4 files using Pandas DataFrames

Project description

python-ags4

A library to read and write AGS4 files using Pandas DataFrames

Installation

pip install python-ags4

Introduction

python-ags4 is a library of functions that lets a user import AGS4 files to a collection of Pandas DataFrames. The data can be analyzed, manipulated, and updated using Pandas and then exported back to an AGS4 file.

Examples

Import module:

from python_ags4 import AGS4

Import data from an AG4 file:

tables, headings = AGS4.AGS4_to_dataframe('/home/asitha/Projects/python-AGS4/tests/test_data.ags')
  • tables is a dictionary of Pandas DataFrames. Each DataFrame contains the data from a GROUP in the AGS4 file.
  • headings is a dictionary of lists. Each list has the header names of the corresponding GROUP

All data are imported as text so they cannot be analyzed or plotted immediately. You can use the following code to convert all the numerical data in a DataFrame from text to numeric.

LOCA = AGS4.convert_to_numeric(tables['LOCA'])

The AGS4.convert_to_numeric() function automatically converts all columns in the input DataFrame with the a numeric TYPE to a float.

Export data back to an AGS4 file:

AGS4.dataframe_to_AGS4(tables, headings, '/home/asitha/Documents/output.ags')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-AGS4-0.1.4.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_AGS4-0.1.4-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file python-AGS4-0.1.4.tar.gz.

File metadata

  • Download URL: python-AGS4-0.1.4.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.9 CPython/3.7.6 Linux/5.4.0-42-generic

File hashes

Hashes for python-AGS4-0.1.4.tar.gz
Algorithm Hash digest
SHA256 72243726167096b8de3fb5a800e89c40540894d1c3cdbb53188de1dcbaaf1a19
MD5 13ba743f31c19a3890b54c2536c089b7
BLAKE2b-256 4848293c3fc86398905a6a31c36c09a6f3b36ee1d8604edbf0b27500cc3b47ab

See more details on using hashes here.

File details

Details for the file python_AGS4-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: python_AGS4-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.9 CPython/3.7.6 Linux/5.4.0-42-generic

File hashes

Hashes for python_AGS4-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bcf76cb180079a40e30992bfc05278069d861d375e3d5b19660cc6c811c21afc
MD5 91bc8a74cbc34d5e9a54a1c548fcd440
BLAKE2b-256 d3ea72f1e0cbd36820e8073f35cc56599845b645110001bcfe5c9b88d6055a15

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page