Skip to main content

Group of utilities for Sabia

Project description

Sabia Utils

This is a collection of utilities for Sabia.

Concat Module

This module is used to concatenate files.

Concatenate all files from a path

  • Returns a concatenated dataframe from all files in a path.
  • Can save the concatenated dataframe to a file.
from sabia_utils import concat

concat.concatenate_all_from_path(
    path='path\\to\\files',
    output_file='output\\file\\path', # optional
    fine_name='file_name'           # optional 
)

Concatenate some files from a path

  • Returns a concatenated dataframe from some files in a path.
  • Can save the concatenated dataframe to a file.
from sabia_utils import concat

concat.concatenate_files(
    path='path\\to\\files',
    files=['file1', 'file2'],
    output_file='output\\file\\path', # optional
    fine_name='file_name'           # optional 
)

Copy files from a path to another

  • Verify if the files exist in the path before copy.
from sabia_utils import group

group.copy_new_files(
    PATH_IN='path\\to\\files1',
    PATH_OUT='path\\to\\files2'
)

Group Module

This module is used to group files.

Process files in both paths

  • Verify if the files exist in the path before process.
from sabia_utils import group

group.process_existent_files(
    PATH_IN='path\\to\\files1',
    PATH_OUT='path\\to\\files2'
)

Process all files

  • apply the function of copy and process files between the paths.
from sabia_utils import group

group.process_all_files(
    PATH_IN='path\\to\\files1',
    PATH_OUT='path\\to\\files2'
)

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

sabia-utils-0.1.1.tar.gz (5.6 kB view details)

Uploaded Source

File details

Details for the file sabia-utils-0.1.1.tar.gz.

File metadata

  • Download URL: sabia-utils-0.1.1.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for sabia-utils-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9e205d5e3d3f2362e9742521acfdf783c9cdb81ca34f65e26160af74b8d39187
MD5 e6d82c0c3861c0b1d879decd1f23abec
BLAKE2b-256 f347cb88abf3a610b26fee000e741ef56e5640f0192b2bbf922e7a5912201493

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