Cloneable referential to get an implementation of DataTable with the best practice.
Implementation of a basic DataTable for sevaral usage in your programs or application.
To install the project, make sure you have Python 3.x version.
git clone git@gitlab.com:mokira3d48/DataTable.git datatable
cd datatableHere 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
- Add new row.
- Remove a indexed row like a python list.
- Insert and replace a row using its index.
- Retrieve the last row using
popmethod exactly like a python list.
Contributions are welcome! Please follow these steps:
- Create a new branch for your feature (
git checkout -b feature/my-feature); - Commit your changes (
git commit -m 'Adding a new feature'); - Push toward the branch (
git push origin --set-upstream feature/my-feature); - Create a new Pull Request or Merge Request.
This project is licensed under the MIT License. See the file LICENSE for more details, contact me please.
For your question or suggestion, contact me please :
- Name : Dr Mokira
- Email : dr.mokira@gmail.com
- GitHub : mokira3d48
- GitLab : mokira3d48