File: pytups.rst

package info (click to toggle)
python-pulp 2.6.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 14,720 kB
  • sloc: python: 7,505; makefile: 16; sh: 16
file content (9 lines) | stat: -rw-r--r-- 702 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
pytups: smart dictionaries and tuple lists
=============================================

pytups defines two classes, SuperDict and TupList, that can be used instead of pyton dictionaries and lists, respectively, without any loss of functionality. They provide a chaining operator (à la pandas) that makes it very easy to manipulate dictionaries into lists of tuples and vice-versa efficiently. It also permits transforming nested dictionaries into flat ones. They have a ton of helper functions that shorten the number of lines of code need without losing readability of the code.

site: https://pchtsp.github.io/pytups/

example using pytups with pulp: https://pchtsp.github.io/pytups/pulp.html