{"id":22535458,"url":"https://github.com/etcetra7n/tabulux","last_synced_at":"2025-03-28T06:16:44.283Z","repository":{"id":57473203,"uuid":"290252719","full_name":"etcetra7n/tabulux","owner":"etcetra7n","description":"A python package for performing tabular operations","archived":false,"fork":false,"pushed_at":"2021-07-25T05:02:13.000Z","size":52,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-11T09:48:24.280Z","etag":null,"topics":["data-structures","python","python-library","tabular-data","tabulate"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/etcetra7n.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-25T15:29:39.000Z","updated_at":"2024-06-21T08:23:33.000Z","dependencies_parsed_at":"2022-09-10T02:02:17.173Z","dependency_job_id":null,"html_url":"https://github.com/etcetra7n/tabulux","commit_stats":null,"previous_names":["john-pix/tabulux-python"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etcetra7n%2Ftabulux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etcetra7n%2Ftabulux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etcetra7n%2Ftabulux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etcetra7n%2Ftabulux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/etcetra7n","download_url":"https://codeload.github.com/etcetra7n/tabulux/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245978280,"owners_count":20703678,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-structures","python","python-library","tabular-data","tabulate"],"created_at":"2024-12-07T10:07:33.090Z","updated_at":"2025-03-28T06:16:44.261Z","avatar_url":"https://github.com/etcetra7n.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"tabulux\n=======\n\nThis package is for performing tablular operations and for making making tabular data.\n\n[Download this documetation](https://drive.google.com/uc?export=download\u0026id=1PBXYawIaA7vfTOCT6JjsfPOhitKGjmHZ)\n\nThis module requires 'pyperclip', for using the copy-paste feature\nYou can still use this module without pyperclip, but it is strongly recommended to install pyperclip\n\n[visit PyPI-Pyperclip](https://pypi.org/project/pyperclip/)\n\nImport using:\n\n    import tabulux\n\nCreate a table object using the *`table`* class\n\nsyntax:\n\n    table_obj = tabulux.table(   \n        {   \n        'Head-A':['Content-A1','Content-A2',],   \n        'Head-B':['Content-B1','Content-B2',],   \n        }   \n    )   \n\nNow the table object have been saved to 'table_obj'\n\nA Virtul table of the above object can be imagined like this:\n\n    | Head-A      | Head-B      |\n    |-------------+-------------|\n    | Content-A1  | Content-B1  |\n    | Content-A2  | Content-B2  |\n\nAvailable functions and methods:\n===============================\n\n+ **column_length()** - returns the column length \n+ **row_length()** - returns the row length\n+ **heads()** - returns the all the headings of the table as a list of strings\n+ **head()** - returns the heading of the specified column as a string\n+ **cell()** - returns the content of a specified cell\n+ **display()** - prints the data in the table in a tabulated form\n+ **row()** - returns a specific row from the table as a list of string\n+ **column()** - returns a specific column from the table as a list of string\n+ **change()** - use this to change the content of a cell after the creation of the table\n+ **add()** returns the sum of two cell content\n+ **add_all()** - returns the sum of a series of cells\n+ **html()** - returns the html code of the table\n\ncolumn_length()\n----------------\n\nUse this method when you need the column length of the table\n\nSyntax:\n\n    table_obj.column_length(copy={True/False})\n\nwhere:\n\n+  `table_obj` = a table object\n+  `copy`      = This boolean attribute copies the result as text to your clipboard (False by default)\n\nreturns integer representing the number of column in `table_obj`\n\nrow_length()\n------------\n\nUse this method when you need the number of rows of the table\n\nSyntax:\n\n    table_obj.row_length(copy={True/False})\n\nwhere:\n\n+  `table_obj` = a table object\n+  `copy`      = This boolean attribute copies the result as text to your clipboard (False by default)\n\nreturns integer representing the number of rows in `table_obj`\n\ncolumn()\n-------\n\nYou could use the column() method to get a list containing all the elements in the specified column as a list\n\nSyntax:\n\n    table_obj.column(column_number)\n\nwhere:\n\n+  `table_obj`      = a table object\n+  `column_number`  = an integer which represents column number (starting from 0) or, the heading of the column (as a string)\n\nreturns all the elements from the specified column as list of strings. The column headings are not returned\n\nA `CellOutOfBoundsException` is raised if the specified column exceeds the number of columns in the table\n\nrow()\n------\n\nYou can use the row() method to get all the elements in a specified row in the table as a list\n\nSyntax:\n\n    table_obj.row(row_number)\n\nwhere:\n\n+  `table_obj`      = a table object\n+  `row_number`     = an integer representing the row number (starts from 0)\n\nreturns all the elements from the specified row as list of strings.\n\nA `CellOutOfBoundsException` is raised if the specified row exceeds the number of rows in the table\n\nheads()\n-------\n\nUse heads() when you want all the headings of the table\n\nSyntax :\n\n    table_obj.heads()\n \nwhere:\n\n+  `table_obj` = a table object\n\nreturns a list of string representing the each heading of the table\n\nhead()\n------\n\nUse head() when you want a heading of a specific column from the table\n\nSyntax:\n\n    table_obj.head(column_number, copy={True/False})\n\nwhere:\n\n+  `table_obj`      =  A table object\n+  `column_number`  =  An integer representing the column number, whose heading you want\n+  `copy`           =  A boolean- if True, copies the heading to your clipboard(False by default)\n\nreturns the heading of the specified column of the table as a string.\n\ncell()\n------\n\nSyntax:\n\nUse this method when you need the cell content of a cell\n\n    table_obj.cell(row_ID, column_ID, copy={True/False})\n\nwhere,\n\n+  `table_obj` = table object\n+  `row`       = integer representing the row number (starting from 0), or, the heading of the column as a string\n+  `column`    = integer representing the column number (starting from 0)\n+  `copy`      = a boolean, if true- copies the result to your clipboard(False,by default)\n\nreturns the Cell Content of the specified location as String. \n\nIf the cell is not defined in the table or the rows or column given is out of bounds, a `CellOutOfBoundsException` is raised\n\ndisplay()\n---------\n\nUse this method when you need to print the table in the console\n\nSyntax :\n\n    table_obj.display()\n\nwhere:\n\n+  `table_obj` = a table object\n\nOutput:\n  prints data in `table_obj` in a tabular form\n  Here is how the table would be printed:\n\n    |Head-A |  Head-B | \n    -------------------\n    |content-A1 | Content-B1 | \n    |content-A2 | Content-B2 | \n\nThis method does not return anything\n\nchange()\n--------\n\nUse change() method to change the content of a cell\n\nSyntax:\n\n\ttable_obj.change(row_ID, column_ID, new_content)\n\t\nwhere, \n\n+  `table_obj`   =  a table object\n+  `row_ID`      =  an integer representing the column number(starts from 0)\n+  `column_ID`   =  an integer representing the column number(starts from 0), or the heading of the column as a string\n+  `new_content` =  a string containg the new content\n  \nchanges the of the specified column to the content in `new_content`\n\nyou can also set a cell content to whatever text copied to your clipboard, by setting the 'paste' argument to True\n\nSyntax:\n\n\ttable_obj.change(row_ID, column_ID, new_content, paste=True)\n\t\nthe 'new_content' is ignored if paste is set to True, so you can leave the new content as `\"\"`.\nThis changes the cell in the specified location to the text in the clipboard.\n\nAditionaly, this method also returns the old content of the specified cell\n\nadd()\n------\n\nThe add method can be used to add two cells, if the cells are integers or can be converted to integers,\n\nSyntax:\n\n\ttable_obj.add(row1, column1, row2, column2, copy={True/False})\n\t\nwhere:\n\n+  `table_obj`    = a table object\n+  `row1`       = cell row of the first cell as an integer\n+  `column1`    = cell column of the first cell as an integer, or the heading of the column as a string\n+  `row2 `      = cell row of the second cell as an integer\n+  `column2`    = cell column of the second cell as an integer, or the heading of the column as a string\n+  `copy`       = If this boolean attribute is set to True, the result will be copied to your clipboard(False by default)\n\nreturns the sum of the two cells\n\nadd_all()\n---------\n\nThe add_all() method can be used to add all the cells from a cell to another cell, if all their values are integers\n\nSyntax:\n\n\ttable_obj.add_all(from_row, from_column, to_row, to_column, copy={True/False})\n\nwhere:\n\n+  `table_obj`   = a table object\n+  `from_row`    = row number of the first cell\n+  `from_column` = column number of the first cell\n+  `to_row`      = row number of the last cell\n+  `to_column`   = column number of the last cell\n+  `copy`        = a boolean, if True- the result will be copied to your clipboard (False by default)\n\nreturns the sum of all the content of cells between the specified cells.\n\nIf any cell content cannot be converted to an integer, 'TypeError' is raised\n\nNOTE: The the ending cell address(to_row, to_column) is not included in the sum.\n\nhtml()\n------\n\nThe 'html()' method is used to get the html snippet of a table.\n\nSyntax:\n\n\ttable_obj.html(display={True/False}, copy={True/False}, indent={int})\n\t\nwhere:\n\n+  `table_obj` = a table object\n+  `display`   = if set to True, this boolean attribute will display the html snippet in the console\\terminal, (False by default)\n+  `copy`      = this boolean attribute, if set to True, copies the html snippet to you clipboard, and can by pasted to your html file(False by default)\n+  `indent`    = indentation spaces that sould be applied, as integer (4 by default)\n\nreturns the html snippet of the table as a string, from and including \\\u003ctable\u003e to \u003c\\/table\u003e\n\n\n[Take me to this project's github repository page](https://github.com/John-pix/Tabulux-Python)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetcetra7n%2Ftabulux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fetcetra7n%2Ftabulux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetcetra7n%2Ftabulux/lists"}