Giter Club home page Giter Club logo

pyhelpers's Introduction

PyHelpers

PyPI Python Version Documentation Status License Codacy Badge Zenodo

PyHelpers is a lightweight open-source Python package designed as a versatile toolkit for simplifying data (pre)processing tasks. It offers a comprehensive range of practical utilities to facilitate common data manipulation operations. These utilities encompass the ability to read and write file-like objects, efficiently handle various data types such as geographical and textual data, and establish streamlined communication with relational databases like PostgreSQL and Microsoft SQL Server.

Installation

To install the latest release of PyHelpers from PyPI via pip:

pip install --upgrade pyhelpers

Please also refer to Installation for more information.

Quick start

For a concise guide on how to utilise PyHelpers, we recommend checking out the quick-start tutorial, which features multiple illustrative examples for each of the modules. These examples effectively demonstrate the capabilities of PyHelpers in facilitating data manipulation tasks and streamlining your work processes.

Documentation

The complete PyHelpers documentation: [HTML] [PDF].

It is hosted on ReadTheDocs and provides a wealth of detailed examples.

License

PyHelpers (since v2.0.0) is licensed under MIT License.

Cite as

Fu, Q. (2020). PyHelpers: an open-source toolkit for facilitating Python users' data manipulation tasks. Zenodo. doi:10.5281/zenodo.4017438

@software{qian_fu_pyhelpers_4017438,
  author    = {Qian Fu},
  title     = {{PyHelpers: an open-source toolkit for facilitating
                Python users' data manipulation tasks}},
  year      = 2020,
  publisher = {Zenodo},
  doi       = {10.5281/zenodo.4017438},
  url       = {https://doi.org/10.5281/zenodo.4017438}
}

(Please also refer to the export options from Zenodo to reference the specific version of PyHelpers as appropriate.)

Contributors

Qian Fu
Qian Fu

๐ŸŒฑ ๐Ÿ’ป ๐Ÿงช ๐Ÿ“–
Xiangyong Luo
Xiangyong Luo

๐Ÿ’ป

pyhelpers's People

Contributors

mikeqfu avatar xyluo25 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

nhaz3l xyluo25

pyhelpers's Issues

Functions in `store` not working properly

Two issues in the sub-package store:

  • In the module ldr, the function load_pickle() may fail to work after upgrading Pandas.
  • In the module svr, the functions save_spreadsheet() and save_spreadsheets() may not work properly in some occasions.

URL encoded character `%5C` instead of `\`

When using the MSSQL class on Windows OS, the database connection URL and address may incorporate encoded characters like %5C instead of the expected backslash \. For example:

>>> from pyhelpers.dbms import MSSQL
>>> mssql = MSSQL()
>>> mssql.address  # Expected: computer_name\username@localhost:1433/master
'computer_name%5Cusername@localhost:1433/master'

Improve the function `save_fig()`

To enhance the functionality of the save_fig() function in the svr module, it is recommended to include a parameter that specifies the figure object, like so: save_fig(data, path_to_file, ...).

Error loading previously saved pickle files

Related functions:

  • load_pickle()
  • load_data()

When attempting to load pickle files that were saved previously, both load_pickle() and load_data() functions encounter an error and fail to read the files. The error message displayed is as follows:

TypeError: Argument 'placement' has incorrect type (expected pandas._libs.internals.BlockPlacement, got numpy.ndarray)

Auto-fit column width in Excel worksheet

When saving data to a spreadsheet in an Excel file using save_spreadsheet() and save_spreadsheets(), we would expect the column widths to be automatically fitted.

Enable customisation of printing messages for checking loading and saving paths

Related functions:

  • _check_loading_path()
  • _check_saving_path()

It is desired to allow users to customise the printing messages for tasks related to checking loading and saving paths. This could involve providing more optional arguments/parameters, which can be helpful for making the process more adaptable to users' needs.

Duplicated functions for relative pathname

Related functions:

  • _check_rel_pathname()
  • _get_rel_pathname()

The two functions within the _cache module are duplicated. One of them may be removed or refactored to avoid confusion and mixed usage.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.