%global _empty_manifest_terminate_build 0 Name: python-pytups Version: 0.86.2 Release: 1 Summary: data wrangling for lists of tuples and dictionaries License: MIT License URL: https://github.com/pchtsp/pytups Source0: https://mirrors.nju.edu.cn/pypi/web/packages/b4/2b/b6b3e4a5dd36b2b62949e5521b069deff0386bf4f45993bfdf910aab9430/pytups-0.86.2.tar.gz BuildArch: noarch %description The idea is to allow sparse operations to be executed in matrix data. I grew used to the chained operations in R's `tidyverse `_ packages or, although not a great fan myself, python's `pandas `_ . I find myself using dictionary and list comprehensions all the time to pass from one data format to the other efficiently. But after doing it for the Nth time, I thought of automaticing it. In my case, it helps me construct optimisation models with `PuLP `_. I see other possible uses not related to OR. I've implemented some additional methods to regular dictionaries, lists and sets to come up with interesting methods that somewhat quickly pass from one to the other and help with data wrangling. In order for the operations to make any sense, the assumption that is done is that whatever you are using has the same 'structure'. For example, if you a have a list of tuples: every element of the list is a tuple with the same size and the Nth element of the tuple has the same type, e.g. ``[(1, 'red', 'b', '2018-01'), (10, 'ccc', 'ttt', 'ff')]``. Note that both tuples have four elements and the first one is a number, not a string. We do not check that this is consistent. They're made to always return a new object, so no "in-place" editing, hopefully. Right now there are three classes to use: dictionaries, tuple lists and ordered sets. %package -n python3-pytups Summary: data wrangling for lists of tuples and dictionaries Provides: python-pytups BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-pytups The idea is to allow sparse operations to be executed in matrix data. I grew used to the chained operations in R's `tidyverse `_ packages or, although not a great fan myself, python's `pandas `_ . I find myself using dictionary and list comprehensions all the time to pass from one data format to the other efficiently. But after doing it for the Nth time, I thought of automaticing it. In my case, it helps me construct optimisation models with `PuLP `_. I see other possible uses not related to OR. I've implemented some additional methods to regular dictionaries, lists and sets to come up with interesting methods that somewhat quickly pass from one to the other and help with data wrangling. In order for the operations to make any sense, the assumption that is done is that whatever you are using has the same 'structure'. For example, if you a have a list of tuples: every element of the list is a tuple with the same size and the Nth element of the tuple has the same type, e.g. ``[(1, 'red', 'b', '2018-01'), (10, 'ccc', 'ttt', 'ff')]``. Note that both tuples have four elements and the first one is a number, not a string. We do not check that this is consistent. They're made to always return a new object, so no "in-place" editing, hopefully. Right now there are three classes to use: dictionaries, tuple lists and ordered sets. %package help Summary: Development documents and examples for pytups Provides: python3-pytups-doc %description help The idea is to allow sparse operations to be executed in matrix data. I grew used to the chained operations in R's `tidyverse `_ packages or, although not a great fan myself, python's `pandas `_ . I find myself using dictionary and list comprehensions all the time to pass from one data format to the other efficiently. But after doing it for the Nth time, I thought of automaticing it. In my case, it helps me construct optimisation models with `PuLP `_. I see other possible uses not related to OR. I've implemented some additional methods to regular dictionaries, lists and sets to come up with interesting methods that somewhat quickly pass from one to the other and help with data wrangling. In order for the operations to make any sense, the assumption that is done is that whatever you are using has the same 'structure'. For example, if you a have a list of tuples: every element of the list is a tuple with the same size and the Nth element of the tuple has the same type, e.g. ``[(1, 'red', 'b', '2018-01'), (10, 'ccc', 'ttt', 'ff')]``. Note that both tuples have four elements and the first one is a number, not a string. We do not check that this is consistent. They're made to always return a new object, so no "in-place" editing, hopefully. Right now there are three classes to use: dictionaries, tuple lists and ordered sets. %prep %autosetup -n pytups-0.86.2 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-pytups -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Mon May 29 2023 Python_Bot - 0.86.2-1 - Package Spec generated