Skip to content

mokira3d48/DataTable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DATA TABLE

Cloneable referential to get an implementation of DataTable with the best practice.

Table of Contents

Description

Implementation of a basic DataTable for sevaral usage in your programs or application.

Installation

To install the project, make sure you have Python 3.x version.

git clone git@gitlab.com:mokira3d48/DataTable.git datatable
cd datatable

Usage

Here is an example how to add a new object row:

from datatable import DataTable


def main():
    """
    Main function
    """
    table = DataTable(['col1', 'col2', 'col3'])
    table.append({"col1": 12, 'col3': "Oky"})
    table.append({"col2": "Foreach", 'col3': "Lina"})
    table.append({"col1": 22, 'col3': "Lina"})
    print(table)

    print({"col1": 12} in table)
    print({"col200": "No way"} in table)
    # print(1000 in table) Not supported yet

if __name__ == '__main__':
    main()
   col1    col2    col3
     12    None     Oky
   None Foreach    Lina
     22    None    Lina

True
False

Features

  • Add new row.
  • Remove a indexed row like a python list.
  • Insert and replace a row using its index.
  • Retrieve the last row using pop method exactly like a python list.

To contribute

Contributions are welcome! Please follow these steps:

  1. Create a new branch for your feature (git checkout -b feature/my-feature);
  2. Commit your changes (git commit -m 'Adding a new feature');
  3. Push toward the branch (git push origin --set-upstream feature/my-feature);
  4. Create a new Pull Request or Merge Request.

Licence

This project is licensed under the MIT License. See the file LICENSE for more details, contact me please.

Contact

For your question or suggestion, contact me please :

About

Implementation of a basic DataTable for sevaral usage in your programs or application.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages