├── .bumpversion.cfg ├── .gitignore ├── .travis.yml ├── LICENSE ├── MANIFEST.in ├── Makefile ├── README.md ├── README_dev.md ├── dataclassframe ├── __init__.py ├── dataclassframe_.py └── test_dataclassframe.py ├── docs ├── .buildinfo ├── .doctrees │ ├── api.doctree │ ├── contributing.doctree │ ├── environment.pickle │ ├── getting_started.doctree │ ├── index.doctree │ └── welcome.doctree ├── .nojekyll ├── _modules │ ├── dataclassframe │ │ └── dataclassframe_.html │ ├── index.html │ └── typing.html ├── _sources │ ├── api.rst.txt │ ├── contributing.md.txt │ ├── getting_started.md.txt │ ├── index.rst.txt │ └── welcome.md.txt ├── _static │ ├── basic.css │ ├── css │ │ ├── badge_only.css │ │ ├── fonts │ │ │ ├── Roboto-Slab-Bold.woff │ │ │ ├── Roboto-Slab-Bold.woff2 │ │ │ ├── Roboto-Slab-Regular.woff │ │ │ ├── Roboto-Slab-Regular.woff2 │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ ├── fontawesome-webfont.woff2 │ │ │ ├── lato-bold-italic.woff │ │ │ ├── lato-bold-italic.woff2 │ │ │ ├── lato-bold.woff │ │ │ ├── lato-bold.woff2 │ │ │ ├── lato-normal-italic.woff │ │ │ ├── lato-normal-italic.woff2 │ │ │ ├── lato-normal.woff │ │ │ └── lato-normal.woff2 │ │ └── theme.css │ ├── doctools.js │ ├── documentation_options.js │ ├── file.png │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── Lato │ │ │ ├── lato-bold.eot │ │ │ ├── lato-bold.ttf │ │ │ ├── lato-bold.woff │ │ │ ├── lato-bold.woff2 │ │ │ ├── lato-bolditalic.eot │ │ │ ├── lato-bolditalic.ttf │ │ │ ├── lato-bolditalic.woff │ │ │ ├── lato-bolditalic.woff2 │ │ │ ├── lato-italic.eot │ │ │ ├── lato-italic.ttf │ │ │ ├── lato-italic.woff │ │ │ ├── lato-italic.woff2 │ │ │ ├── lato-regular.eot │ │ │ ├── lato-regular.ttf │ │ │ ├── lato-regular.woff │ │ │ └── lato-regular.woff2 │ │ ├── Roboto-Slab-Bold.woff │ │ ├── Roboto-Slab-Bold.woff2 │ │ ├── Roboto-Slab-Light.woff │ │ ├── Roboto-Slab-Light.woff2 │ │ ├── Roboto-Slab-Regular.woff │ │ ├── Roboto-Slab-Regular.woff2 │ │ ├── Roboto-Slab-Thin.woff │ │ ├── Roboto-Slab-Thin.woff2 │ │ ├── RobotoSlab │ │ │ ├── roboto-slab-v7-bold.eot │ │ │ ├── roboto-slab-v7-bold.ttf │ │ │ ├── roboto-slab-v7-bold.woff │ │ │ ├── roboto-slab-v7-bold.woff2 │ │ │ ├── roboto-slab-v7-regular.eot │ │ │ ├── roboto-slab-v7-regular.ttf │ │ │ ├── roboto-slab-v7-regular.woff │ │ │ └── roboto-slab-v7-regular.woff2 │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ ├── fontawesome-webfont.woff2 │ │ ├── lato-bold-italic.woff │ │ ├── lato-bold-italic.woff2 │ │ ├── lato-bold.woff │ │ ├── lato-bold.woff2 │ │ ├── lato-normal-italic.woff │ │ ├── lato-normal-italic.woff2 │ │ ├── lato-normal.woff │ │ └── lato-normal.woff2 │ ├── jquery-3.5.1.js │ ├── jquery.js │ ├── js │ │ ├── badge_only.js │ │ ├── html5shiv-printshiv.min.js │ │ ├── html5shiv.min.js │ │ ├── modernizr.min.js │ │ └── theme.js │ ├── language_data.js │ ├── minus.png │ ├── plus.png │ ├── pygments.css │ ├── searchtools.js │ ├── underscore-1.3.1.js │ └── underscore.js ├── api.html ├── contributing.html ├── genindex.html ├── getting_started.html ├── index.html ├── objects.inv ├── py-modindex.html ├── search.html ├── searchindex.js └── welcome.html ├── docs_source ├── Makefile ├── api.rst ├── conf.py ├── contributing.md ├── getting_started.md ├── index.rst ├── make.bat └── welcome.md ├── pytest.ini ├── requirements.txt ├── requirements_dev.txt ├── setup.cfg ├── setup.py └── tox.ini /.bumpversion.cfg: -------------------------------------------------------------------------------- 1 | [bumpversion] 2 | current_version = 0.1.0 3 | commit = True 4 | tag = True 5 | 6 | [bumpversion:file:setup.cfg] 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | ### Python template 3 | # Byte-compiled / optimized / DLL files 4 | __pycache__/ 5 | *.py[cod] 6 | *$py.class 7 | 8 | # C extensions 9 | *.so 10 | 11 | # Distribution / packaging 12 | .Python 13 | build/ 14 | develop-eggs/ 15 | dist/ 16 | downloads/ 17 | eggs/ 18 | .eggs/ 19 | lib/ 20 | lib64/ 21 | parts/ 22 | sdist/ 23 | var/ 24 | wheels/ 25 | share/python-wheels/ 26 | *.egg-info/ 27 | .installed.cfg 28 | *.egg 29 | MANIFEST 30 | 31 | # PyInstaller 32 | # Usually these files are written by a python script from a template 33 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 34 | *.manifest 35 | *.spec 36 | 37 | # Installer logs 38 | pip-log.txt 39 | pip-delete-this-directory.txt 40 | 41 | # Unit test / coverage reports 42 | htmlcov/ 43 | .tox/ 44 | .nox/ 45 | .coverage 46 | .coverage.* 47 | .cache 48 | nosetests.xml 49 | coverage.xml 50 | *.cover 51 | *.py,cover 52 | .hypothesis/ 53 | .pytest_cache/ 54 | cover/ 55 | 56 | # Translations 57 | *.mo 58 | *.pot 59 | 60 | # Django stuff: 61 | *.log 62 | local_settings.py 63 | db.sqlite3 64 | db.sqlite3-journal 65 | 66 | # Flask stuff: 67 | instance/ 68 | .webassets-cache 69 | 70 | # Scrapy stuff: 71 | .scrapy 72 | 73 | # Sphinx documentation 74 | docs/_build/ 75 | 76 | # PyBuilder 77 | .pybuilder/ 78 | target/ 79 | 80 | # Jupyter Notebook 81 | .ipynb_checkpoints 82 | 83 | # IPython 84 | profile_default/ 85 | ipython_config.py 86 | 87 | # pyenv 88 | # For a library or package, you might want to ignore these files since the code is 89 | # intended to run in multiple environments; otherwise, check them in: 90 | # .python-version 91 | 92 | # pipenv 93 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 94 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 95 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 96 | # install all needed dependencies. 97 | #Pipfile.lock 98 | 99 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 100 | __pypackages__/ 101 | 102 | # Celery stuff 103 | celerybeat-schedule 104 | celerybeat.pid 105 | 106 | # SageMath parsed files 107 | *.sage.py 108 | 109 | # Environments 110 | .env 111 | .venv 112 | env/ 113 | venv/ 114 | ENV/ 115 | env.bak/ 116 | venv.bak/ 117 | 118 | # Spyder project settings 119 | .spyderproject 120 | .spyproject 121 | 122 | # Rope project settings 123 | .ropeproject 124 | 125 | # mkdocs documentation 126 | /site 127 | 128 | # mypy 129 | .mypy_cache/ 130 | .dmypy.json 131 | dmypy.json 132 | 133 | # Pyre type checker 134 | .pyre/ 135 | 136 | # pytype static type analyzer 137 | .pytype/ 138 | 139 | # Cython debug symbols 140 | cython_debug/ 141 | 142 | ### macOS template 143 | # General 144 | .DS_Store 145 | .AppleDouble 146 | .LSOverride 147 | 148 | # Icon must end with two \r 149 | Icon 150 | 151 | # Thumbnails 152 | ._* 153 | 154 | # Files that might appear in the root of a volume 155 | .DocumentRevisions-V100 156 | .fseventsd 157 | .Spotlight-V100 158 | .TemporaryItems 159 | .Trashes 160 | .VolumeIcon.icns 161 | .com.apple.timemachine.donotpresent 162 | 163 | # Directories potentially created on remote AFP share 164 | .AppleDB 165 | .AppleDesktop 166 | Network Trash Folder 167 | Temporary Items 168 | .apdisk 169 | 170 | ### JetBrains template 171 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider 172 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 173 | 174 | # User-specific stuff 175 | .idea/**/workspace.xml 176 | .idea/**/tasks.xml 177 | .idea/**/usage.statistics.xml 178 | .idea/**/dictionaries 179 | .idea/**/shelf 180 | 181 | # Generated files 182 | .idea/**/contentModel.xml 183 | 184 | # Sensitive or high-churn files 185 | .idea/**/dataSources/ 186 | .idea/**/dataSources.ids 187 | .idea/**/dataSources.local.xml 188 | .idea/**/sqlDataSources.xml 189 | .idea/**/dynamic.xml 190 | .idea/**/uiDesigner.xml 191 | .idea/**/dbnavigator.xml 192 | 193 | # Gradle 194 | .idea/**/gradle.xml 195 | .idea/**/libraries 196 | 197 | # Gradle and Maven with auto-import 198 | # When using Gradle or Maven with auto-import, you should exclude module files, 199 | # since they will be recreated, and may cause churn. Uncomment if using 200 | # auto-import. 201 | # .idea/artifacts 202 | # .idea/compiler.xml 203 | # .idea/jarRepositories.xml 204 | # .idea/modules.xml 205 | # .idea/*.iml 206 | # .idea/modules 207 | # *.iml 208 | # *.ipr 209 | 210 | # CMake 211 | cmake-build-*/ 212 | 213 | # Mongo Explorer plugin 214 | .idea/**/mongoSettings.xml 215 | 216 | # File-based project format 217 | *.iws 218 | 219 | # IntelliJ 220 | out/ 221 | 222 | # mpeltonen/sbt-idea plugin 223 | .idea_modules/ 224 | 225 | # JIRA plugin 226 | atlassian-ide-plugin.xml 227 | 228 | # Cursive Clojure plugin 229 | .idea/replstate.xml 230 | 231 | # Crashlytics plugin (for Android Studio and IntelliJ) 232 | com_crashlytics_export_strings.xml 233 | crashlytics.properties 234 | crashlytics-build.properties 235 | fabric.properties 236 | 237 | # Editor-based Rest Client 238 | .idea/httpRequests 239 | 240 | # Android studio 3.1+ serialized cache file 241 | .idea/caches/build_file_checksums.ser 242 | 243 | dataclassframe-venv/ 244 | .idea/ -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | python: 3 | - "3.6" 4 | - "3.7" 5 | - "3.8" 6 | #- "3.9" 7 | before_install: 8 | - python --version 9 | - pip install --upgrade pip 10 | - pip install --upgrade pytest 11 | install: 12 | - pip install -r requirements.txt 13 | - pip install -r requirements_dev.txt 14 | script: 15 | - pytest 16 | after_success: 17 | - codecov # submit coverage -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Josh Levy-Kramer 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README*.md 2 | include requirements*.txt 3 | include LICENSE 4 | include pyproject.toml 5 | global-include *.pyx 6 | global-include *.pyd -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Add to PHONY target list so it always it run even when nothing has changed 2 | .PHONY: dist install clean venv-create venv-activate docs check-dist test-pypi pypi-upload 3 | 4 | dist: 5 | python setup.py sdist bdist_wheel 6 | 7 | install: 8 | pip install . 9 | 10 | clean: 11 | $(RM) -r build dist src/*.egg-info 12 | $(RM) -r .pytest_cache 13 | find . -name __pycache__ -exec rm -r {} + 14 | #git clean -fdX 15 | 16 | venv-create: 17 | python -m venv dataclassframe-venv 18 | source dataclassframe-venv/bin/activate 19 | 20 | venv-activate: 21 | # Doesn't work. Need to execute manually 22 | source dataclassframe-venv/bin/activate 23 | 24 | venv-delete: 25 | rm -rf dataclassframe-venv 26 | 27 | docs: 28 | sphinx-build -a -E -b html docs_source docs 29 | 30 | check-dist: 31 | twine check dist/* 32 | 33 | test-pypi: 34 | twine upload --repository-url https://test.pypi.org/legacy/ dist/* 35 | 36 | pypi-upload: 37 | twine upload dist/* -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![PyPI](https://img.shields.io/pypi/v/dataclassframe)](https://pypi.org/project/dataclassframe/) 2 | ![Python](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9-blue) 3 | [![Build Status](https://travis-ci.com/joshlk/dataclassframe.svg?branch=main)](https://travis-ci.com/joshlk/dataclassframe) 4 | [![Documentation](https://readthedocs.org/projects/pip/badge/?version=latest&style=flat)](https://joshlk.github.io/dataclassframe) 5 | 6 | # dataclassframe 7 | 8 | A dataclass container with multi-indexing and bulk operations. 9 | Provides the typed benefits and ergonomics of dataclasses while having the efficiency of [Pandas dataframes](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html). 10 | 11 | The container is based on [data-oriented design][1] by optimising the memory layout of the stored data, providing fast 12 | bulk operations and a smaller memory footprint for large collections. 13 | Bulk operations are enabled using Pandas which has a rich set of vectorised methods for both numerical and string 14 | data types. 15 | 16 | Multi-indexing provides the ability to use multiple fields as keys to index the records. 17 | This is suitable for bidirectional and inverse dictionary keys. 18 | 19 | A DataClassFrame provides good ergonomics for production code as columns are immutable 20 | and columns/data types are well defined by the dataclasses. 21 | This makes it easier for users to understand the "shape" of the data in large projects and refactor when necessary. 22 | 23 | ## Installing 24 | 25 | Get the latest version using pip/PyPi 26 | 27 | ```shell 28 | pip install dataclassframe 29 | ``` 30 | 31 | ## Feature comparison 32 | 33 | | Container | Positional indexing | Key indexing | Multi-key indexing | Data-oriented design | Column-wise opperations | Type hints | Use in prod | 34 | |-------------------------------------------------|---------------------|--------------|--------------------|----------------------|-------------------------|------------|-------------| 35 | | **DataClassFrame** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | 36 | | List | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ | 37 | | Dictionary | ❌ | ✅ | ❌ | ❌ | ❌ | ✅ | ✅ | 38 | | [MIDict](https://github.com/ShenggaoZhu/midict) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | ✅ | 39 | | [Pandas DataFrame](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌* | 40 | 41 | *DataFrames used in production code as an data interchange format is [considered by the author and others as an anti-pattern][2]. 42 | 43 | ## Show by example 44 | 45 | A container data-type for dataclasses... 46 | ```python 47 | from dataclasses import dataclass 48 | from dataclassframe import DataClassFrame 49 | 50 | @dataclass 51 | class ExampleDC: 52 | field1: str 53 | field2: int 54 | 55 | records = [ 56 | ExampleDC('a', 1), 57 | ExampleDC('b', 2), 58 | ExampleDC('c', 3), 59 | ] 60 | 61 | dcf = DataClassFrame( 62 | record_class=ExampleDC, 63 | data=records, 64 | index=['field1', 'field2'] 65 | ) 66 | ``` 67 | 68 | Which acts like a ordered dictionary with multi-indexing... 69 | ```python 70 | # Obtain record `ExampleDC('b', 2)` 71 | row_idx = dcf.iat[1] # Using positional index 72 | row_f1 = dcf.at['b'] # Using index of `field1` 73 | row_f2 = dcf.at[:, 2] # Using index of `field2` 74 | assert row_idx == row_f1 == row_f2 75 | ``` 76 | 77 | With bulk operations on the columns.. 78 | ```python 79 | assert dcf.cols.field2.sum() == 6 80 | ``` 81 | 82 | Works nicely with Python 3 type hints... 83 | ```python 84 | dcf: DataClassFrame[ExampleDC] 85 | dcf.iat[1]: ExampleDC 86 | ``` 87 | 88 | ## Design 89 | 90 | It's no secret that under the hood DataClassFrames are using Pandas DataFrames to store data. 91 | The data is converted where possible to Pandas Series, which in turn use Numpy arrays. When the user accesses a record the data is then converted back into the dataclass provided at initialisation. 92 | 93 | Pandas provides many advantages over of using a simple list of dataclasses such as better memory 94 | footprint and fast vectorised operations. Each column of data is stored (usually) using Numpy arrays which use a continuous block of memory. Providing faster access and better CPU cache characteristics. 95 | 96 | However using Pandas DataFrames directly in production code as a data interchange format is [considered by the author and others as an anti-pattern][2]. 97 | Specifically as DataFrames are column-wise mutable and therefore difficult to determine at code-time what columns 98 | the dataframe contains i.e. its shape. Users of DataFrames will typically add new columns to add new features. 99 | 100 | DataClasses on the other hand are attribute-wise immutable. Therefore the intentions and shape of the data are clear, making it easier to refactor and maintain the code. 101 | 102 | DataFrames also do not provide any type-hinting benefits, while DataClass do as they are attribute-wise immutable. 103 | 104 | DataClassFrames provide the benefits of both worlds by defining the data shape upfront by using a DataClasses. The columns and record data types are defined by the provided dataclass. 105 | 106 | [1]: https://jamesmcm.github.io/blog/2020/07/25/intro-dod/ 107 | [2]: https://devanla.com/posts/do-not-create-that-dataframe.html 108 | 109 | ## Todo 110 | 111 | - [ ] Slicing and dataclassframe views for accessing data and setting data 112 | - [ ] Append and inserts 113 | - [ ] Data-oriented design for Numpy fields 114 | 115 | ## Changelog 116 | 117 | All notable changes to this project will be documented here. 118 | 119 | The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) 120 | and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). 121 | 122 | ### [0.1.0] - 2020-10-22 123 | #### Added 124 | - Initial release of `dataclassframe` 125 | 126 | 127 | ## License 128 | 129 | © Josh Levy-Kramer 2020. dataclassframe is released under the MIT license. -------------------------------------------------------------------------------- /README_dev.md: -------------------------------------------------------------------------------- 1 | 2 | # Build and push to PyPi 3 | Requires: `pip install twine` 4 | Don't forget to increment version number 5 | 6 | Bump version (major, minor or patch): 7 | 8 | ```shell script 9 | bump2version patch 10 | ``` 11 | 12 | Download distributions 13 | 14 | ```shell script 15 | make dist 16 | ``` 17 | 18 | Upload to test PyPi 19 | 20 | ```shell script 21 | make check-dist 22 | make test-pypi 23 | ``` 24 | 25 | Activate virtual env (might need to `make venv-create`) 26 | 27 | ```shell script 28 | source dataclassframe-venv/bin/activate 29 | ``` 30 | 31 | Test install (in virtual env): 32 | 33 | ```shell script 34 | pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple dataclassframe 35 | ``` 36 | 37 | Then push to real PyPI: 38 | 39 | ```shell script 40 | rm -r dist 41 | make dist 42 | make pypi-upload 43 | ``` 44 | -------------------------------------------------------------------------------- /dataclassframe/__init__.py: -------------------------------------------------------------------------------- 1 | from .dataclassframe_ import DataClassFrame 2 | -------------------------------------------------------------------------------- /dataclassframe/dataclassframe_.py: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | import numpy as np 3 | from dataclasses import fields 4 | from typing import Optional, List, Union, Type, TypeVar, Generic, Iterable 5 | from copy import copy, deepcopy 6 | 7 | RecordT = TypeVar("RecordT") 8 | 9 | 10 | def to_basic_type(obj): 11 | if isinstance(obj, np.generic): 12 | return obj.item() 13 | else: 14 | return obj 15 | 16 | def is_collection(var): 17 | """Test if iterable but not a string""" 18 | return isinstance(var, Iterable) and not isinstance(var, str) 19 | 20 | 21 | class _IAtIndexer(Generic[RecordT]): 22 | def __init__(self, dcf: "DataClassFrame[RecordT]"): 23 | self.dcf = dcf 24 | 25 | def __getitem__(self, key: int) -> RecordT: 26 | row = self.dcf.df.iloc[key] 27 | 28 | if isinstance(row, pd.DataFrame): 29 | if len(row) > 1: 30 | raise KeyError("key combination is not unique. To slice use `iloc` method.") 31 | row = row.iloc[0] 32 | 33 | row = {k: to_basic_type(v) for k, v in row.to_dict().items()} 34 | row = self.dcf.record_class(**row) 35 | return row 36 | 37 | def __setitem__(self, key: int, value: RecordT): 38 | row = pd.Series(value.__dict__) 39 | self.dcf.df.iloc[key] = row 40 | 41 | 42 | class _AtIndexer(Generic[RecordT]): 43 | def __init__(self, dcf: "DataClassFrame"): 44 | self.dcf = dcf 45 | 46 | def __getitem__(self, key) -> RecordT: 47 | idx = pd.IndexSlice 48 | row = self.dcf.df.loc[idx[key], :] 49 | 50 | if isinstance(row, pd.DataFrame): 51 | if len(row) > 1: 52 | raise KeyError("key combination is not unique. To slice use `loc` method.") 53 | row = row.iloc[0] 54 | 55 | row = {k: to_basic_type(v) for k, v in row.to_dict().items()} 56 | row = self.dcf.record_class(**row) 57 | return row 58 | 59 | def __setitem__(self, key, value: RecordT): 60 | index_values_in_record = tuple(value.__dict__[field] for field in self.dcf.index) 61 | key = (key,) if not isinstance(key, tuple) else key 62 | if key != index_values_in_record: 63 | raise ValueError( 64 | "key {} must equal values in the record ({})".format(key, index_values_in_record)) 65 | row = pd.Series(value.__dict__) 66 | if len(key) == 1: 67 | key_slice = key[0] 68 | else: 69 | key_slice = pd.IndexSlice[key] 70 | self.dcf.df.loc[key_slice, :] = row 71 | 72 | 73 | class _ColumnsWrapper(object): 74 | def __init__(self, dcf: "DataClassFrame"): 75 | cols = set(dcf.df.columns) 76 | super().__setattr__('__dcf', dcf) 77 | super().__setattr__('__cols', cols) 78 | 79 | def __getattribute__(self, name) -> pd.Series: 80 | cols = super().__getattribute__('__cols') 81 | dcf = super().__getattribute__('__dcf') 82 | 83 | if name in cols: 84 | return dcf.df[name] 85 | else: 86 | return super().__getattribute__(name) 87 | 88 | def __setattr__(self, name, value): 89 | cols = super().__getattribute__('__cols') 90 | dcf = super().__getattribute__('__dcf') 91 | 92 | if name in cols: 93 | # TODO: verify dataframe-type isn't changed 94 | dcf.df[name] = value 95 | else: 96 | super().__setattr__(name, value) 97 | 98 | 99 | class DataClassFrame(Generic[RecordT]): 100 | def __init__( 101 | self, 102 | record_class: Type[RecordT], 103 | data: Iterable[RecordT], 104 | index: Union[None, str, List[str]] = None, 105 | ): 106 | """ 107 | Container of dataclasses. 108 | 109 | Args: 110 | record_class: The dataclasses class of each record 111 | data: An iterable of dataclass records 112 | index: Fields of the dataclass to use as indexes 113 | """ 114 | 115 | def validate_and_to_dict(i, dc): 116 | if not isinstance(dc, record_class): 117 | raise ValueError( 118 | "All dataframe must be of type {}. Found type {} at index {}".format(record_class, dc, i)) 119 | return dc.__dict__ 120 | 121 | df_data = [validate_and_to_dict(i, dc) for i, dc in enumerate(data)] 122 | if len(df_data) < 1: 123 | raise ValueError("Data must contain at least one record") 124 | df = self._dataclass_to_empty_dataframe(record_class) 125 | df = df.append(df_data) 126 | 127 | self._from_dataframe(record_class=record_class, dataframe=df, index=index) 128 | 129 | @classmethod 130 | def from_dataframe( 131 | cls, 132 | record_class: Type[RecordT], 133 | dataframe: Optional[pd.DataFrame] = None, 134 | index: Union[None, str, List[str]] = None, 135 | ): 136 | """ 137 | Create a DataClassFrame using a Pandas DataFrame 138 | 139 | Args: 140 | record_class: The dataclasses class of each record 141 | dataframe: A Pandas DataFrame of dataframe 142 | index: Fields of the dataclass to use as indexes 143 | 144 | Returns: DataClassFrame 145 | 146 | """ 147 | 148 | self = cls.__new__(cls) 149 | self._from_dataframe(record_class=record_class, dataframe=dataframe, index=index) 150 | return self 151 | 152 | def _from_dataframe( 153 | self, 154 | record_class: Type[RecordT], 155 | dataframe: Optional[pd.DataFrame] = None, 156 | index: Union[None, str, List[str]] = None, 157 | ): 158 | self.record_class = record_class 159 | 160 | if dataframe is not None: 161 | self.df = dataframe 162 | else: 163 | self.df = self._dataclass_to_empty_dataframe(record_class) 164 | 165 | self.index = index 166 | if index is not None: 167 | self.index = list(index) if is_collection(index) else [index] 168 | self.df = self.df.set_index(index, drop=False, verify_integrity=True) 169 | else: 170 | self.df = self.df.reset_index(drop=True) 171 | 172 | self._cols = _ColumnsWrapper(self) 173 | 174 | @staticmethod 175 | def _dataclass_to_empty_dataframe(record_class: Type[RecordT]): 176 | """ 177 | Convert dataclass class to a empty dataframe with matching columns 178 | """ 179 | 180 | df = pd.DataFrame() 181 | for field in fields(record_class): 182 | try: 183 | df[field.name] = pd.Series(name=field.name, dtype=field.type) 184 | except TypeError: 185 | # If `TypeError` raised by `pandas_dtype` method. Just default to 'object' i.e. list 186 | df[field.name] = pd.Series(name=field.name, dtype='object') 187 | return df 188 | 189 | @property 190 | def iat(self) -> _IAtIndexer[RecordT]: 191 | """ 192 | Access or set a single element using positional index. 193 | 194 | Returns: A record of type `RecordT` 195 | 196 | Examples: 197 | Access second element: 198 | 199 | >>> self.iat[1] 200 | 201 | Access last element: 202 | 203 | >>> self.iat[-1] 204 | 205 | Set record at position 0: 206 | 207 | >>> self.iat[0] = RecordT(foo='a', bar=1) 208 | 209 | """ 210 | 211 | return _IAtIndexer(self) 212 | 213 | @property 214 | def at(self) -> _AtIndexer[RecordT]: 215 | """ 216 | Access or set a single element using a dictionary like key(s). The key or key combination must 217 | index a unique record otherwise a `KeyError` is raised. 218 | 219 | Returns: A record of type `RecordT` 220 | 221 | Examples: 222 | Access record `'a'` using the first field index: 223 | 224 | >>> self.at['a'] 225 | 226 | Access record `'b'` using the second field index: 227 | 228 | >>> self.at[:, 'b'] 229 | 230 | Access record with joint key `('c', 'd')`: 231 | 232 | >>> self.at['c', 'd'] 233 | 234 | Set record with joint key `('a', 'f')`: 235 | 236 | >>> self.at['a', 'f'] = RecordT(foo='a', bar='f') 237 | 238 | """ 239 | 240 | return _AtIndexer(self) 241 | 242 | @property 243 | def cols(self) -> _ColumnsWrapper: 244 | """ 245 | Access or set a column as a Pandas Series 246 | 247 | Returns: 248 | Pandas Series of column 249 | 250 | Examples: 251 | Access column `a`: 252 | 253 | >>> self.cols.a 254 | 255 | Sum column `a`: 256 | 257 | >>> self.cols.a.sum() 258 | 259 | Set all values in column `a` to 0: 260 | 261 | >>> self.cols.a = 0 262 | 263 | """ 264 | 265 | return self._cols 266 | 267 | def __repr__(self) -> str: 268 | record_class_name = self.record_class.__name__ 269 | header = f'DataClassFrame[{record_class_name}]\n' 270 | 271 | # Get df info 272 | df_repr = self.df.__repr__() 273 | return header + df_repr 274 | 275 | def head(self, n: int = 5) -> 'DataClassFrame[RecordT]': 276 | """ 277 | Provide first `n` rows of self 278 | 279 | Args: 280 | n: First `n` rows to output 281 | 282 | Returns: DataClassFrame of head 283 | 284 | """ 285 | 286 | new_dcf = self.copy(deep=False) 287 | new_dcf.df = self.df.head(n=n) 288 | return new_dcf 289 | 290 | def copy(self, deep: bool = True) -> 'DataClassFrame[RecordT]': 291 | """ 292 | Copy self 293 | 294 | Args: 295 | deep: Perform deep copy or not 296 | 297 | Returns: copy of DataClassFrame 298 | 299 | """ 300 | 301 | if deep: 302 | return deepcopy(self) 303 | else: 304 | return copy(self) 305 | 306 | def to_dataframe(self) -> pd.DataFrame: 307 | """ 308 | Convert to dataframe. Copy dataframe to prevent side-effects. 309 | 310 | Returns: Pandas DataFrame of same dataframe 311 | 312 | """ 313 | 314 | return self.df.copy(deep=True) 315 | -------------------------------------------------------------------------------- /dataclassframe/test_dataclassframe.py: -------------------------------------------------------------------------------- 1 | import io 2 | from typing import Optional 3 | 4 | from dataclassframe import DataClassFrame 5 | from dataclasses import dataclass 6 | import pandas as pd 7 | import numpy as np 8 | import pytest 9 | 10 | 11 | @dataclass 12 | class DataClassExample1: 13 | a: int 14 | b: str 15 | 16 | 17 | def test_dataclass_str(): 18 | # no index 19 | data = pd.DataFrame([[1, "a"], [2, "b"], [3, "c"]], columns=["a", "b"]) 20 | dcf = DataClassFrame.from_dataframe(record_class=DataClassExample1, dataframe=data) 21 | print(dcf) 22 | 23 | # single index 24 | data = pd.DataFrame([[1, "a"], [2, "b"], [3, "c"]], columns=["a", "b"]) 25 | dcf = DataClassFrame.from_dataframe(record_class=DataClassExample1, dataframe=data, index="b") 26 | print(dcf) 27 | 28 | # multi-index 29 | data = pd.DataFrame([[1, "a"], [2, "b"], [3, "c"]], columns=["a", "b"]) 30 | dcf = DataClassFrame.from_dataframe(record_class=DataClassExample1, dataframe=data, index=["a", "b"]) 31 | print(dcf) 32 | 33 | 34 | def test_iat_indexing(): 35 | data = pd.DataFrame([[1, "a"], [2, "b"], [3, "c"]], columns=["a", "b"]) 36 | dcf = DataClassFrame.from_dataframe(record_class=DataClassExample1, dataframe=data, index="b") 37 | 38 | row = dcf.iat[0] 39 | assert isinstance(row, DataClassExample1) 40 | assert isinstance(row.a, int) and isinstance(row.b, str) 41 | assert row.a == 1 and row.b == "a" 42 | 43 | data_row = DataClassExample1(a=11, b="ZZ") 44 | dcf.iat[1] = data_row 45 | row = dcf.iat[1] 46 | assert row == data_row 47 | 48 | 49 | def test_at_indexing(): 50 | data = pd.DataFrame([[1, "a"], [2, "b"], [3, "c"]], columns=["a", "b"]) 51 | dcf: DataClassFrame[DataClassExample1] = DataClassFrame.from_dataframe( 52 | record_class=DataClassExample1, dataframe=data, index="b") 53 | 54 | row = dcf.at['b'] 55 | assert isinstance(row, DataClassExample1) 56 | assert isinstance(row.a, int) and isinstance(row.b, str) 57 | assert row.a == 2 and row.b == "b" 58 | 59 | data_row = DataClassExample1(a=11, b="ZZ") 60 | dcf.at['ZZ'] = data_row 61 | row = dcf.at['ZZ'] 62 | assert row == data_row 63 | 64 | with pytest.raises(ValueError): 65 | # Index key is different to value in record 66 | dcf.at['A'] = DataClassExample1(a=0, b="B") 67 | 68 | 69 | @dataclass 70 | class ExampleDC: 71 | a: str 72 | b: int 73 | 74 | 75 | def test_at_multiindexing_basic(): 76 | records = [ 77 | ExampleDC('a', 1), 78 | ExampleDC('b', 2), 79 | ExampleDC('c', 3), 80 | ] 81 | 82 | dcf = DataClassFrame( 83 | ExampleDC, 84 | records, 85 | index=['a', 'b']) 86 | 87 | a = dcf.iat[1] 88 | b = dcf.at['b'] 89 | c = dcf.at['b', :] 90 | d = dcf.at[:, 2] 91 | assert a == b == c == d 92 | 93 | def test_at_multiindexing_setting_value(): 94 | records = [ 95 | ExampleDC('a', 1), 96 | ExampleDC('b', 2), 97 | ExampleDC('c', 3), 98 | ] 99 | 100 | dcf = DataClassFrame( 101 | ExampleDC, 102 | records, 103 | index=['a', 'b']) 104 | 105 | new_rec = ExampleDC('d', 5) 106 | dcf.at['d', 5] = new_rec 107 | assert new_rec == dcf.at['d', 5] 108 | 109 | with pytest.raises(ValueError): 110 | # Key data miss-match 111 | dcf.at['e', 6] = ExampleDC('d', 5) 112 | 113 | def test_from_records(): 114 | data = [ 115 | DataClassExample1(1, 'a'), 116 | DataClassExample1(2, 'b'), 117 | DataClassExample1(3, 'c'), 118 | ] 119 | 120 | dcf = DataClassFrame(record_class=DataClassExample1, data=data, index='b') 121 | 122 | rec = dcf.at['c'] 123 | assert rec == DataClassExample1(3, 'c') 124 | 125 | with pytest.raises(ValueError): 126 | data = [ 127 | DataClassExample1(1, 'a'), 128 | ExampleDC(0, 0) 129 | ] 130 | DataClassFrame(record_class=DataClassExample1, data=data, index='b') 131 | 132 | 133 | def test_columns(): 134 | data = pd.DataFrame([[1, "a"], [2, "b"], [3, "c"]], columns=["a", "b"]) 135 | dcf = DataClassFrame.from_dataframe(record_class=DataClassExample1, dataframe=data, index="b") 136 | 137 | # Get sum of all columns 138 | assert 6 == dcf.cols.a.sum() 139 | 140 | # Set and then sum all columns 141 | dcf.cols.a = 1 142 | assert 3 == dcf.cols.a.sum() 143 | 144 | # String concatenation 145 | assert dcf.cols.b.sum() == 'abc' 146 | 147 | 148 | 149 | @dataclass 150 | class MIExample: 151 | A: str 152 | B: str 153 | C: str 154 | U: str 155 | bar: int 156 | foo: int 157 | bah: int 158 | foh: int 159 | 160 | 161 | def test_multiindex(): 162 | data = """ 163 | A B C U bah bar foh foo 164 | A0 B0 C0 U0 2 0 3 1 165 | A0 B0 C1 U1 6 4 7 5 166 | A0 B0 C2 U2 10 8 11 9 167 | A0 B0 C3 U3 14 12 15 13 168 | A0 B1 C0 U4 18 16 19 17 169 | A0 B1 C1 U5 22 20 23 21 170 | A0 B1 C2 U6 26 24 27 25 171 | A0 B1 C3 U7 30 28 31 29 172 | A1 B0 C0 U8 34 32 35 33 173 | A1 B0 C1 U9 38 36 39 37 174 | A1 B0 C2 U10 42 40 43 41 175 | A1 B0 C3 U11 46 44 47 45 176 | A1 B1 C0 U12 50 48 51 49 177 | A1 B1 C1 U13 54 52 55 53 178 | A1 B1 C2 U14 58 56 59 57 179 | A1 B1 C3 U15 62 60 63 61 180 | """ 181 | 182 | data = pd.read_csv(io.StringIO(data), sep='\t') 183 | dcf = DataClassFrame.from_dataframe(MIExample, data, index=['A', 'B', 'C', 'U']) 184 | 185 | row_0 = dcf.iat[0] 186 | row_U0 = dcf.at[:, :, :, 'U0'] # Index U0 provides a unique result 187 | assert row_0 == row_U0 188 | 189 | row_ABC0 = dcf.at['A0', 'B0', 'C0', :] # A, B, C Combination provides a unique result 190 | assert row_0 == row_ABC0 191 | 192 | # Not a unique key combination 193 | with pytest.raises(KeyError): 194 | dcf.at['A0'] 195 | 196 | with pytest.raises(KeyError): 197 | dcf.at['A0', 'B0', :, :] 198 | 199 | 200 | @dataclass 201 | class DataClassTestTypes: 202 | a: np.ndarray 203 | b: pd.Series 204 | c: pd.DataFrame 205 | d: list 206 | e: dict 207 | f: DataClassExample1 208 | 209 | def test_non_basic_types(): 210 | 211 | data = [ 212 | DataClassTestTypes( 213 | a = np.ones((10,)), 214 | b = pd.Series(np.arange(10)), 215 | c = pd.DataFrame(np.zeros((3,3))), 216 | d = [1,2,3], 217 | e = {'a': 1, 'b': 2}, 218 | f = DataClassExample1(1, 'a') 219 | ) 220 | ] 221 | 222 | dcf = DataClassFrame(record_class=DataClassTestTypes, data=data) 223 | rec = dcf.iat[0] 224 | 225 | assert isinstance(rec.a, np.ndarray) 226 | assert np.array_equal(rec.a, np.ones((10,))) 227 | 228 | assert isinstance(rec.b, pd.Series) 229 | assert rec.b.equals(pd.Series(np.arange(10))) 230 | 231 | assert isinstance(rec.c, pd.DataFrame) 232 | assert rec.c.equals(pd.DataFrame(np.zeros((3,3)))) 233 | 234 | assert isinstance(rec.d, list) 235 | assert rec.d == [1,2,3] 236 | 237 | assert isinstance(rec.e, dict) 238 | assert rec.e == {'a': 1, 'b': 2} 239 | 240 | assert isinstance(rec.f, DataClassExample1) 241 | assert rec.f == DataClassExample1(1, 'a') 242 | 243 | @dataclass 244 | class DataClassNoneValues: 245 | string: Optional[str] 246 | integer: Optional[int] 247 | floating: Optional[float] 248 | boolean: Optional[bool] 249 | 250 | 251 | def test_none_values(): 252 | data = [ 253 | DataClassNoneValues( 254 | string=None, 255 | integer=None, 256 | floating=None, 257 | boolean=None, 258 | ) 259 | ] 260 | 261 | dcf = DataClassFrame(record_class=DataClassNoneValues, data=data) 262 | rec = dcf.iat[0] 263 | 264 | assert rec.string is None 265 | assert rec.integer is None 266 | assert rec.floating is None 267 | assert rec.boolean is None 268 | 269 | -------------------------------------------------------------------------------- /docs/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: eba8d9bd0b31eca8b5c85dedb8a519e4 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/.doctrees/api.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/.doctrees/api.doctree -------------------------------------------------------------------------------- /docs/.doctrees/contributing.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/.doctrees/contributing.doctree -------------------------------------------------------------------------------- /docs/.doctrees/environment.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/.doctrees/environment.pickle -------------------------------------------------------------------------------- /docs/.doctrees/getting_started.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/.doctrees/getting_started.doctree -------------------------------------------------------------------------------- /docs/.doctrees/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/.doctrees/index.doctree -------------------------------------------------------------------------------- /docs/.doctrees/welcome.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/.doctrees/welcome.doctree -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/.nojekyll -------------------------------------------------------------------------------- /docs/_modules/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Overview: module code — dataclassframe v0.1.0 documentation 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
45 | 46 | 97 | 98 |
99 | 100 | 101 | 107 | 108 | 109 |
110 | 111 |
112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 |
130 | 131 |
    132 | 133 |
  • »
  • 134 | 135 |
  • Overview: module code
  • 136 | 137 | 138 |
  • 139 | 140 |
  • 141 | 142 |
143 | 144 | 145 |
146 |
147 |
148 |
149 | 150 |

All modules for which code is available

151 | 153 | 154 |
155 | 156 |
157 | 179 | 180 |
181 |
182 | 183 |
184 | 185 |
186 | 187 | 188 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | -------------------------------------------------------------------------------- /docs/_sources/api.rst.txt: -------------------------------------------------------------------------------- 1 | ============ 2 | API 3 | ============ 4 | 5 | :mod:`dataclassframe` 6 | ===================== 7 | 8 | .. autoclass:: dataclassframe.DataClassFrame 9 | :members: 10 | :undoc-members: 11 | :inherited-members: -------------------------------------------------------------------------------- /docs/_sources/contributing.md.txt: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Contributions are welcomed. Please fork and submit PR request. Code on [GitHub](https://github.com/joshlk/dataclassframe). -------------------------------------------------------------------------------- /docs/_sources/getting_started.md.txt: -------------------------------------------------------------------------------- 1 | # Getting started 2 | 3 | ## Installing 4 | 5 | Get the latest version using pip/PyPi 6 | 7 | ```shell 8 | pip install dataclassframe 9 | ``` 10 | 11 | ## Example usage 12 | 13 | A container data-type for dataclasses... 14 | ```python 15 | from dataclasses import dataclass 16 | from dataclassframe import DataClassFrame 17 | 18 | @dataclass 19 | class ExampleDC: 20 | field1: str 21 | field2: int 22 | 23 | records = [ 24 | ExampleDC('a', 1), 25 | ExampleDC('b', 2), 26 | ExampleDC('c', 3), 27 | ] 28 | 29 | dcf = DataClassFrame( 30 | record_class=ExampleDC, 31 | data=records, 32 | index=['field1', 'field2'] 33 | ) 34 | ``` 35 | 36 | Which acts like a ordered dictionary with multi-indexing... 37 | ```python 38 | # Obtain record `ExampleDC('b', 2)` 39 | row_idx = dcf.iat[1] # Using positional index 40 | row_f1 = dcf.at['b'] # Using index of `field1` 41 | row_f2 = dcf.at[:, 2] # Using index of `field2` 42 | assert row_idx == row_f1 == row_f2 43 | ``` 44 | 45 | With bulk operations on the columns.. 46 | ```python 47 | assert dcf.cols.field2.sum() == 6 48 | ``` 49 | 50 | Works nicely with Python 3 type hints... 51 | ```python 52 | dcf: DataClassFrame[ExampleDC] 53 | dcf.iat[1]: ExampleDC 54 | ``` 55 | -------------------------------------------------------------------------------- /docs/_sources/index.rst.txt: -------------------------------------------------------------------------------- 1 | .. dataclassframe documentation master file, created by 2 | sphinx-quickstart on Tue Oct 27 09:45:39 2020. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | :caption: Contents: 9 | 10 | welcome 11 | getting_started 12 | api 13 | contributing 14 | 15 | Indices and tables 16 | ================== 17 | 18 | * :ref:`genindex` 19 | * :ref:`modindex` 20 | * :ref:`search` 21 | -------------------------------------------------------------------------------- /docs/_sources/welcome.md.txt: -------------------------------------------------------------------------------- 1 | # Welcome to dataclassframe's documentation! 2 | 3 | A dataclass container with multi-indexing and bulk operations. Provides the typed benefits and ergonomics of dataclasses while having the efficiency of Pandas dataframes. 4 | 5 | The container is based on data-oriented design by optimising the memory layout of the stored data, providing fast bulk operations and a smaller memory footprint for large collections. Bulk operations are enabled using Pandas which has a rich set of vectorised methods for both numerical and string data types. 6 | 7 | Multi-indexing provides the ability to use multiple fields as keys to index the records. This is suitable for bidirectional and inverse dictionary keys. 8 | 9 | A DataClassFrame provides good ergonomics for production code as columns are immutable and columns/data types are well defined by the dataclasses. This makes it easier for users to understand the "shape" of the data in large projects and refactor when necessary. -------------------------------------------------------------------------------- /docs/_static/basic.css: -------------------------------------------------------------------------------- 1 | /* 2 | * basic.css 3 | * ~~~~~~~~~ 4 | * 5 | * Sphinx stylesheet -- basic theme. 6 | * 7 | * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | /* -- main layout ----------------------------------------------------------- */ 13 | 14 | div.clearer { 15 | clear: both; 16 | } 17 | 18 | div.section::after { 19 | display: block; 20 | content: ''; 21 | clear: left; 22 | } 23 | 24 | /* -- relbar ---------------------------------------------------------------- */ 25 | 26 | div.related { 27 | width: 100%; 28 | font-size: 90%; 29 | } 30 | 31 | div.related h3 { 32 | display: none; 33 | } 34 | 35 | div.related ul { 36 | margin: 0; 37 | padding: 0 0 0 10px; 38 | list-style: none; 39 | } 40 | 41 | div.related li { 42 | display: inline; 43 | } 44 | 45 | div.related li.right { 46 | float: right; 47 | margin-right: 5px; 48 | } 49 | 50 | /* -- sidebar --------------------------------------------------------------- */ 51 | 52 | div.sphinxsidebarwrapper { 53 | padding: 10px 5px 0 10px; 54 | } 55 | 56 | div.sphinxsidebar { 57 | float: left; 58 | width: 230px; 59 | margin-left: -100%; 60 | font-size: 90%; 61 | word-wrap: break-word; 62 | overflow-wrap : break-word; 63 | } 64 | 65 | div.sphinxsidebar ul { 66 | list-style: none; 67 | } 68 | 69 | div.sphinxsidebar ul ul, 70 | div.sphinxsidebar ul.want-points { 71 | margin-left: 20px; 72 | list-style: square; 73 | } 74 | 75 | div.sphinxsidebar ul ul { 76 | margin-top: 0; 77 | margin-bottom: 0; 78 | } 79 | 80 | div.sphinxsidebar form { 81 | margin-top: 10px; 82 | } 83 | 84 | div.sphinxsidebar input { 85 | border: 1px solid #98dbcc; 86 | font-family: sans-serif; 87 | font-size: 1em; 88 | } 89 | 90 | div.sphinxsidebar #searchbox form.search { 91 | overflow: hidden; 92 | } 93 | 94 | div.sphinxsidebar #searchbox input[type="text"] { 95 | float: left; 96 | width: 80%; 97 | padding: 0.25em; 98 | box-sizing: border-box; 99 | } 100 | 101 | div.sphinxsidebar #searchbox input[type="submit"] { 102 | float: left; 103 | width: 20%; 104 | border-left: none; 105 | padding: 0.25em; 106 | box-sizing: border-box; 107 | } 108 | 109 | 110 | img { 111 | border: 0; 112 | max-width: 100%; 113 | } 114 | 115 | /* -- search page ----------------------------------------------------------- */ 116 | 117 | ul.search { 118 | margin: 10px 0 0 20px; 119 | padding: 0; 120 | } 121 | 122 | ul.search li { 123 | padding: 5px 0 5px 20px; 124 | background-image: url(file.png); 125 | background-repeat: no-repeat; 126 | background-position: 0 7px; 127 | } 128 | 129 | ul.search li a { 130 | font-weight: bold; 131 | } 132 | 133 | ul.search li div.context { 134 | color: #888; 135 | margin: 2px 0 0 30px; 136 | text-align: left; 137 | } 138 | 139 | ul.keywordmatches li.goodmatch a { 140 | font-weight: bold; 141 | } 142 | 143 | /* -- index page ------------------------------------------------------------ */ 144 | 145 | table.contentstable { 146 | width: 90%; 147 | margin-left: auto; 148 | margin-right: auto; 149 | } 150 | 151 | table.contentstable p.biglink { 152 | line-height: 150%; 153 | } 154 | 155 | a.biglink { 156 | font-size: 1.3em; 157 | } 158 | 159 | span.linkdescr { 160 | font-style: italic; 161 | padding-top: 5px; 162 | font-size: 90%; 163 | } 164 | 165 | /* -- general index --------------------------------------------------------- */ 166 | 167 | table.indextable { 168 | width: 100%; 169 | } 170 | 171 | table.indextable td { 172 | text-align: left; 173 | vertical-align: top; 174 | } 175 | 176 | table.indextable ul { 177 | margin-top: 0; 178 | margin-bottom: 0; 179 | list-style-type: none; 180 | } 181 | 182 | table.indextable > tbody > tr > td > ul { 183 | padding-left: 0em; 184 | } 185 | 186 | table.indextable tr.pcap { 187 | height: 10px; 188 | } 189 | 190 | table.indextable tr.cap { 191 | margin-top: 10px; 192 | background-color: #f2f2f2; 193 | } 194 | 195 | img.toggler { 196 | margin-right: 3px; 197 | margin-top: 3px; 198 | cursor: pointer; 199 | } 200 | 201 | div.modindex-jumpbox { 202 | border-top: 1px solid #ddd; 203 | border-bottom: 1px solid #ddd; 204 | margin: 1em 0 1em 0; 205 | padding: 0.4em; 206 | } 207 | 208 | div.genindex-jumpbox { 209 | border-top: 1px solid #ddd; 210 | border-bottom: 1px solid #ddd; 211 | margin: 1em 0 1em 0; 212 | padding: 0.4em; 213 | } 214 | 215 | /* -- domain module index --------------------------------------------------- */ 216 | 217 | table.modindextable td { 218 | padding: 2px; 219 | border-collapse: collapse; 220 | } 221 | 222 | /* -- general body styles --------------------------------------------------- */ 223 | 224 | div.body { 225 | min-width: 450px; 226 | max-width: 800px; 227 | } 228 | 229 | div.body p, div.body dd, div.body li, div.body blockquote { 230 | -moz-hyphens: auto; 231 | -ms-hyphens: auto; 232 | -webkit-hyphens: auto; 233 | hyphens: auto; 234 | } 235 | 236 | a.headerlink { 237 | visibility: hidden; 238 | } 239 | 240 | a.brackets:before, 241 | span.brackets > a:before{ 242 | content: "["; 243 | } 244 | 245 | a.brackets:after, 246 | span.brackets > a:after { 247 | content: "]"; 248 | } 249 | 250 | h1:hover > a.headerlink, 251 | h2:hover > a.headerlink, 252 | h3:hover > a.headerlink, 253 | h4:hover > a.headerlink, 254 | h5:hover > a.headerlink, 255 | h6:hover > a.headerlink, 256 | dt:hover > a.headerlink, 257 | caption:hover > a.headerlink, 258 | p.caption:hover > a.headerlink, 259 | div.code-block-caption:hover > a.headerlink { 260 | visibility: visible; 261 | } 262 | 263 | div.body p.caption { 264 | text-align: inherit; 265 | } 266 | 267 | div.body td { 268 | text-align: left; 269 | } 270 | 271 | .first { 272 | margin-top: 0 !important; 273 | } 274 | 275 | p.rubric { 276 | margin-top: 30px; 277 | font-weight: bold; 278 | } 279 | 280 | img.align-left, .figure.align-left, object.align-left { 281 | clear: left; 282 | float: left; 283 | margin-right: 1em; 284 | } 285 | 286 | img.align-right, .figure.align-right, object.align-right { 287 | clear: right; 288 | float: right; 289 | margin-left: 1em; 290 | } 291 | 292 | img.align-center, .figure.align-center, object.align-center { 293 | display: block; 294 | margin-left: auto; 295 | margin-right: auto; 296 | } 297 | 298 | img.align-default, .figure.align-default { 299 | display: block; 300 | margin-left: auto; 301 | margin-right: auto; 302 | } 303 | 304 | .align-left { 305 | text-align: left; 306 | } 307 | 308 | .align-center { 309 | text-align: center; 310 | } 311 | 312 | .align-default { 313 | text-align: center; 314 | } 315 | 316 | .align-right { 317 | text-align: right; 318 | } 319 | 320 | /* -- sidebars -------------------------------------------------------------- */ 321 | 322 | div.sidebar { 323 | margin: 0 0 0.5em 1em; 324 | border: 1px solid #ddb; 325 | padding: 7px; 326 | background-color: #ffe; 327 | width: 40%; 328 | float: right; 329 | clear: right; 330 | overflow-x: auto; 331 | } 332 | 333 | p.sidebar-title { 334 | font-weight: bold; 335 | } 336 | 337 | div.admonition, div.topic, blockquote { 338 | clear: left; 339 | } 340 | 341 | /* -- topics ---------------------------------------------------------------- */ 342 | 343 | div.topic { 344 | border: 1px solid #ccc; 345 | padding: 7px; 346 | margin: 10px 0 10px 0; 347 | } 348 | 349 | p.topic-title { 350 | font-size: 1.1em; 351 | font-weight: bold; 352 | margin-top: 10px; 353 | } 354 | 355 | /* -- admonitions ----------------------------------------------------------- */ 356 | 357 | div.admonition { 358 | margin-top: 10px; 359 | margin-bottom: 10px; 360 | padding: 7px; 361 | } 362 | 363 | div.admonition dt { 364 | font-weight: bold; 365 | } 366 | 367 | p.admonition-title { 368 | margin: 0px 10px 5px 0px; 369 | font-weight: bold; 370 | } 371 | 372 | div.body p.centered { 373 | text-align: center; 374 | margin-top: 25px; 375 | } 376 | 377 | /* -- content of sidebars/topics/admonitions -------------------------------- */ 378 | 379 | div.sidebar > :last-child, 380 | div.topic > :last-child, 381 | div.admonition > :last-child { 382 | margin-bottom: 0; 383 | } 384 | 385 | div.sidebar::after, 386 | div.topic::after, 387 | div.admonition::after, 388 | blockquote::after { 389 | display: block; 390 | content: ''; 391 | clear: both; 392 | } 393 | 394 | /* -- tables ---------------------------------------------------------------- */ 395 | 396 | table.docutils { 397 | margin-top: 10px; 398 | margin-bottom: 10px; 399 | border: 0; 400 | border-collapse: collapse; 401 | } 402 | 403 | table.align-center { 404 | margin-left: auto; 405 | margin-right: auto; 406 | } 407 | 408 | table.align-default { 409 | margin-left: auto; 410 | margin-right: auto; 411 | } 412 | 413 | table caption span.caption-number { 414 | font-style: italic; 415 | } 416 | 417 | table caption span.caption-text { 418 | } 419 | 420 | table.docutils td, table.docutils th { 421 | padding: 1px 8px 1px 5px; 422 | border-top: 0; 423 | border-left: 0; 424 | border-right: 0; 425 | border-bottom: 1px solid #aaa; 426 | } 427 | 428 | table.footnote td, table.footnote th { 429 | border: 0 !important; 430 | } 431 | 432 | th { 433 | text-align: left; 434 | padding-right: 5px; 435 | } 436 | 437 | table.citation { 438 | border-left: solid 1px gray; 439 | margin-left: 1px; 440 | } 441 | 442 | table.citation td { 443 | border-bottom: none; 444 | } 445 | 446 | th > :first-child, 447 | td > :first-child { 448 | margin-top: 0px; 449 | } 450 | 451 | th > :last-child, 452 | td > :last-child { 453 | margin-bottom: 0px; 454 | } 455 | 456 | /* -- figures --------------------------------------------------------------- */ 457 | 458 | div.figure { 459 | margin: 0.5em; 460 | padding: 0.5em; 461 | } 462 | 463 | div.figure p.caption { 464 | padding: 0.3em; 465 | } 466 | 467 | div.figure p.caption span.caption-number { 468 | font-style: italic; 469 | } 470 | 471 | div.figure p.caption span.caption-text { 472 | } 473 | 474 | /* -- field list styles ----------------------------------------------------- */ 475 | 476 | table.field-list td, table.field-list th { 477 | border: 0 !important; 478 | } 479 | 480 | .field-list ul { 481 | margin: 0; 482 | padding-left: 1em; 483 | } 484 | 485 | .field-list p { 486 | margin: 0; 487 | } 488 | 489 | .field-name { 490 | -moz-hyphens: manual; 491 | -ms-hyphens: manual; 492 | -webkit-hyphens: manual; 493 | hyphens: manual; 494 | } 495 | 496 | /* -- hlist styles ---------------------------------------------------------- */ 497 | 498 | table.hlist { 499 | margin: 1em 0; 500 | } 501 | 502 | table.hlist td { 503 | vertical-align: top; 504 | } 505 | 506 | 507 | /* -- other body styles ----------------------------------------------------- */ 508 | 509 | ol.arabic { 510 | list-style: decimal; 511 | } 512 | 513 | ol.loweralpha { 514 | list-style: lower-alpha; 515 | } 516 | 517 | ol.upperalpha { 518 | list-style: upper-alpha; 519 | } 520 | 521 | ol.lowerroman { 522 | list-style: lower-roman; 523 | } 524 | 525 | ol.upperroman { 526 | list-style: upper-roman; 527 | } 528 | 529 | :not(li) > ol > li:first-child > :first-child, 530 | :not(li) > ul > li:first-child > :first-child { 531 | margin-top: 0px; 532 | } 533 | 534 | :not(li) > ol > li:last-child > :last-child, 535 | :not(li) > ul > li:last-child > :last-child { 536 | margin-bottom: 0px; 537 | } 538 | 539 | ol.simple ol p, 540 | ol.simple ul p, 541 | ul.simple ol p, 542 | ul.simple ul p { 543 | margin-top: 0; 544 | } 545 | 546 | ol.simple > li:not(:first-child) > p, 547 | ul.simple > li:not(:first-child) > p { 548 | margin-top: 0; 549 | } 550 | 551 | ol.simple p, 552 | ul.simple p { 553 | margin-bottom: 0; 554 | } 555 | 556 | dl.footnote > dt, 557 | dl.citation > dt { 558 | float: left; 559 | margin-right: 0.5em; 560 | } 561 | 562 | dl.footnote > dd, 563 | dl.citation > dd { 564 | margin-bottom: 0em; 565 | } 566 | 567 | dl.footnote > dd:after, 568 | dl.citation > dd:after { 569 | content: ""; 570 | clear: both; 571 | } 572 | 573 | dl.field-list { 574 | display: grid; 575 | grid-template-columns: fit-content(30%) auto; 576 | } 577 | 578 | dl.field-list > dt { 579 | font-weight: bold; 580 | word-break: break-word; 581 | padding-left: 0.5em; 582 | padding-right: 5px; 583 | } 584 | 585 | dl.field-list > dt:after { 586 | content: ":"; 587 | } 588 | 589 | dl.field-list > dd { 590 | padding-left: 0.5em; 591 | margin-top: 0em; 592 | margin-left: 0em; 593 | margin-bottom: 0em; 594 | } 595 | 596 | dl { 597 | margin-bottom: 15px; 598 | } 599 | 600 | dd > :first-child { 601 | margin-top: 0px; 602 | } 603 | 604 | dd ul, dd table { 605 | margin-bottom: 10px; 606 | } 607 | 608 | dd { 609 | margin-top: 3px; 610 | margin-bottom: 10px; 611 | margin-left: 30px; 612 | } 613 | 614 | dl > dd:last-child, 615 | dl > dd:last-child > :last-child { 616 | margin-bottom: 0; 617 | } 618 | 619 | dt:target, span.highlighted { 620 | background-color: #fbe54e; 621 | } 622 | 623 | rect.highlighted { 624 | fill: #fbe54e; 625 | } 626 | 627 | dl.glossary dt { 628 | font-weight: bold; 629 | font-size: 1.1em; 630 | } 631 | 632 | .optional { 633 | font-size: 1.3em; 634 | } 635 | 636 | .sig-paren { 637 | font-size: larger; 638 | } 639 | 640 | .versionmodified { 641 | font-style: italic; 642 | } 643 | 644 | .system-message { 645 | background-color: #fda; 646 | padding: 5px; 647 | border: 3px solid red; 648 | } 649 | 650 | .footnote:target { 651 | background-color: #ffa; 652 | } 653 | 654 | .line-block { 655 | display: block; 656 | margin-top: 1em; 657 | margin-bottom: 1em; 658 | } 659 | 660 | .line-block .line-block { 661 | margin-top: 0; 662 | margin-bottom: 0; 663 | margin-left: 1.5em; 664 | } 665 | 666 | .guilabel, .menuselection { 667 | font-family: sans-serif; 668 | } 669 | 670 | .accelerator { 671 | text-decoration: underline; 672 | } 673 | 674 | .classifier { 675 | font-style: oblique; 676 | } 677 | 678 | .classifier:before { 679 | font-style: normal; 680 | margin: 0.5em; 681 | content: ":"; 682 | } 683 | 684 | abbr, acronym { 685 | border-bottom: dotted 1px; 686 | cursor: help; 687 | } 688 | 689 | /* -- code displays --------------------------------------------------------- */ 690 | 691 | pre { 692 | overflow: auto; 693 | overflow-y: hidden; /* fixes display issues on Chrome browsers */ 694 | } 695 | 696 | pre, div[class*="highlight-"] { 697 | clear: both; 698 | } 699 | 700 | span.pre { 701 | -moz-hyphens: none; 702 | -ms-hyphens: none; 703 | -webkit-hyphens: none; 704 | hyphens: none; 705 | } 706 | 707 | div[class*="highlight-"] { 708 | margin: 1em 0; 709 | } 710 | 711 | td.linenos pre { 712 | border: 0; 713 | background-color: transparent; 714 | color: #aaa; 715 | } 716 | 717 | table.highlighttable { 718 | display: block; 719 | } 720 | 721 | table.highlighttable tbody { 722 | display: block; 723 | } 724 | 725 | table.highlighttable tr { 726 | display: flex; 727 | } 728 | 729 | table.highlighttable td { 730 | margin: 0; 731 | padding: 0; 732 | } 733 | 734 | table.highlighttable td.linenos { 735 | padding-right: 0.5em; 736 | } 737 | 738 | table.highlighttable td.code { 739 | flex: 1; 740 | overflow: hidden; 741 | } 742 | 743 | .highlight .hll { 744 | display: block; 745 | } 746 | 747 | div.highlight pre, 748 | table.highlighttable pre { 749 | margin: 0; 750 | } 751 | 752 | div.code-block-caption + div { 753 | margin-top: 0; 754 | } 755 | 756 | div.code-block-caption { 757 | margin-top: 1em; 758 | padding: 2px 5px; 759 | font-size: small; 760 | } 761 | 762 | div.code-block-caption code { 763 | background-color: transparent; 764 | } 765 | 766 | table.highlighttable td.linenos, 767 | div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */ 768 | user-select: none; 769 | } 770 | 771 | div.code-block-caption span.caption-number { 772 | padding: 0.1em 0.3em; 773 | font-style: italic; 774 | } 775 | 776 | div.code-block-caption span.caption-text { 777 | } 778 | 779 | div.literal-block-wrapper { 780 | margin: 1em 0; 781 | } 782 | 783 | code.descname { 784 | background-color: transparent; 785 | font-weight: bold; 786 | font-size: 1.2em; 787 | } 788 | 789 | code.descclassname { 790 | background-color: transparent; 791 | } 792 | 793 | code.xref, a code { 794 | background-color: transparent; 795 | font-weight: bold; 796 | } 797 | 798 | h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { 799 | background-color: transparent; 800 | } 801 | 802 | .viewcode-link { 803 | float: right; 804 | } 805 | 806 | .viewcode-back { 807 | float: right; 808 | font-family: sans-serif; 809 | } 810 | 811 | div.viewcode-block:target { 812 | margin: -1px -10px; 813 | padding: 0 10px; 814 | } 815 | 816 | /* -- math display ---------------------------------------------------------- */ 817 | 818 | img.math { 819 | vertical-align: middle; 820 | } 821 | 822 | div.body div.math p { 823 | text-align: center; 824 | } 825 | 826 | span.eqno { 827 | float: right; 828 | } 829 | 830 | span.eqno a.headerlink { 831 | position: absolute; 832 | z-index: 1; 833 | } 834 | 835 | div.math:hover a.headerlink { 836 | visibility: visible; 837 | } 838 | 839 | /* -- printout stylesheet --------------------------------------------------- */ 840 | 841 | @media print { 842 | div.document, 843 | div.documentwrapper, 844 | div.bodywrapper { 845 | margin: 0 !important; 846 | width: 100%; 847 | } 848 | 849 | div.sphinxsidebar, 850 | div.related, 851 | div.footer, 852 | #top-link { 853 | display: none; 854 | } 855 | } -------------------------------------------------------------------------------- /docs/_static/css/badge_only.css: -------------------------------------------------------------------------------- 1 | .fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}} -------------------------------------------------------------------------------- /docs/_static/css/fonts/Roboto-Slab-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/css/fonts/Roboto-Slab-Bold.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/Roboto-Slab-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/css/fonts/Roboto-Slab-Bold.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/Roboto-Slab-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/css/fonts/Roboto-Slab-Regular.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/Roboto-Slab-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/css/fonts/Roboto-Slab-Regular.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/css/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/_static/css/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/css/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/_static/css/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/css/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/css/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-bold-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/css/fonts/lato-bold-italic.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-bold-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/css/fonts/lato-bold-italic.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/css/fonts/lato-bold.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/css/fonts/lato-bold.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-normal-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/css/fonts/lato-normal-italic.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-normal-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/css/fonts/lato-normal-italic.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/css/fonts/lato-normal.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/css/fonts/lato-normal.woff2 -------------------------------------------------------------------------------- /docs/_static/doctools.js: -------------------------------------------------------------------------------- 1 | /* 2 | * doctools.js 3 | * ~~~~~~~~~~~ 4 | * 5 | * Sphinx JavaScript utilities for all documentation. 6 | * 7 | * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | /** 13 | * select a different prefix for underscore 14 | */ 15 | $u = _.noConflict(); 16 | 17 | /** 18 | * make the code below compatible with browsers without 19 | * an installed firebug like debugger 20 | if (!window.console || !console.firebug) { 21 | var names = ["log", "debug", "info", "warn", "error", "assert", "dir", 22 | "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", 23 | "profile", "profileEnd"]; 24 | window.console = {}; 25 | for (var i = 0; i < names.length; ++i) 26 | window.console[names[i]] = function() {}; 27 | } 28 | */ 29 | 30 | /** 31 | * small helper function to urldecode strings 32 | */ 33 | jQuery.urldecode = function(x) { 34 | return decodeURIComponent(x).replace(/\+/g, ' '); 35 | }; 36 | 37 | /** 38 | * small helper function to urlencode strings 39 | */ 40 | jQuery.urlencode = encodeURIComponent; 41 | 42 | /** 43 | * This function returns the parsed url parameters of the 44 | * current request. Multiple values per key are supported, 45 | * it will always return arrays of strings for the value parts. 46 | */ 47 | jQuery.getQueryParameters = function(s) { 48 | if (typeof s === 'undefined') 49 | s = document.location.search; 50 | var parts = s.substr(s.indexOf('?') + 1).split('&'); 51 | var result = {}; 52 | for (var i = 0; i < parts.length; i++) { 53 | var tmp = parts[i].split('=', 2); 54 | var key = jQuery.urldecode(tmp[0]); 55 | var value = jQuery.urldecode(tmp[1]); 56 | if (key in result) 57 | result[key].push(value); 58 | else 59 | result[key] = [value]; 60 | } 61 | return result; 62 | }; 63 | 64 | /** 65 | * highlight a given string on a jquery object by wrapping it in 66 | * span elements with the given class name. 67 | */ 68 | jQuery.fn.highlightText = function(text, className) { 69 | function highlight(node, addItems) { 70 | if (node.nodeType === 3) { 71 | var val = node.nodeValue; 72 | var pos = val.toLowerCase().indexOf(text); 73 | if (pos >= 0 && 74 | !jQuery(node.parentNode).hasClass(className) && 75 | !jQuery(node.parentNode).hasClass("nohighlight")) { 76 | var span; 77 | var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); 78 | if (isInSVG) { 79 | span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); 80 | } else { 81 | span = document.createElement("span"); 82 | span.className = className; 83 | } 84 | span.appendChild(document.createTextNode(val.substr(pos, text.length))); 85 | node.parentNode.insertBefore(span, node.parentNode.insertBefore( 86 | document.createTextNode(val.substr(pos + text.length)), 87 | node.nextSibling)); 88 | node.nodeValue = val.substr(0, pos); 89 | if (isInSVG) { 90 | var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); 91 | var bbox = node.parentElement.getBBox(); 92 | rect.x.baseVal.value = bbox.x; 93 | rect.y.baseVal.value = bbox.y; 94 | rect.width.baseVal.value = bbox.width; 95 | rect.height.baseVal.value = bbox.height; 96 | rect.setAttribute('class', className); 97 | addItems.push({ 98 | "parent": node.parentNode, 99 | "target": rect}); 100 | } 101 | } 102 | } 103 | else if (!jQuery(node).is("button, select, textarea")) { 104 | jQuery.each(node.childNodes, function() { 105 | highlight(this, addItems); 106 | }); 107 | } 108 | } 109 | var addItems = []; 110 | var result = this.each(function() { 111 | highlight(this, addItems); 112 | }); 113 | for (var i = 0; i < addItems.length; ++i) { 114 | jQuery(addItems[i].parent).before(addItems[i].target); 115 | } 116 | return result; 117 | }; 118 | 119 | /* 120 | * backward compatibility for jQuery.browser 121 | * This will be supported until firefox bug is fixed. 122 | */ 123 | if (!jQuery.browser) { 124 | jQuery.uaMatch = function(ua) { 125 | ua = ua.toLowerCase(); 126 | 127 | var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || 128 | /(webkit)[ \/]([\w.]+)/.exec(ua) || 129 | /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || 130 | /(msie) ([\w.]+)/.exec(ua) || 131 | ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || 132 | []; 133 | 134 | return { 135 | browser: match[ 1 ] || "", 136 | version: match[ 2 ] || "0" 137 | }; 138 | }; 139 | jQuery.browser = {}; 140 | jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; 141 | } 142 | 143 | /** 144 | * Small JavaScript module for the documentation. 145 | */ 146 | var Documentation = { 147 | 148 | init : function() { 149 | this.fixFirefoxAnchorBug(); 150 | this.highlightSearchWords(); 151 | this.initIndexTable(); 152 | if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) { 153 | this.initOnKeyListeners(); 154 | } 155 | }, 156 | 157 | /** 158 | * i18n support 159 | */ 160 | TRANSLATIONS : {}, 161 | PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; }, 162 | LOCALE : 'unknown', 163 | 164 | // gettext and ngettext don't access this so that the functions 165 | // can safely bound to a different name (_ = Documentation.gettext) 166 | gettext : function(string) { 167 | var translated = Documentation.TRANSLATIONS[string]; 168 | if (typeof translated === 'undefined') 169 | return string; 170 | return (typeof translated === 'string') ? translated : translated[0]; 171 | }, 172 | 173 | ngettext : function(singular, plural, n) { 174 | var translated = Documentation.TRANSLATIONS[singular]; 175 | if (typeof translated === 'undefined') 176 | return (n == 1) ? singular : plural; 177 | return translated[Documentation.PLURALEXPR(n)]; 178 | }, 179 | 180 | addTranslations : function(catalog) { 181 | for (var key in catalog.messages) 182 | this.TRANSLATIONS[key] = catalog.messages[key]; 183 | this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); 184 | this.LOCALE = catalog.locale; 185 | }, 186 | 187 | /** 188 | * add context elements like header anchor links 189 | */ 190 | addContextElements : function() { 191 | $('div[id] > :header:first').each(function() { 192 | $('\u00B6'). 193 | attr('href', '#' + this.id). 194 | attr('title', _('Permalink to this headline')). 195 | appendTo(this); 196 | }); 197 | $('dt[id]').each(function() { 198 | $('\u00B6'). 199 | attr('href', '#' + this.id). 200 | attr('title', _('Permalink to this definition')). 201 | appendTo(this); 202 | }); 203 | }, 204 | 205 | /** 206 | * workaround a firefox stupidity 207 | * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 208 | */ 209 | fixFirefoxAnchorBug : function() { 210 | if (document.location.hash && $.browser.mozilla) 211 | window.setTimeout(function() { 212 | document.location.href += ''; 213 | }, 10); 214 | }, 215 | 216 | /** 217 | * highlight the search words provided in the url in the text 218 | */ 219 | highlightSearchWords : function() { 220 | var params = $.getQueryParameters(); 221 | var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; 222 | if (terms.length) { 223 | var body = $('div.body'); 224 | if (!body.length) { 225 | body = $('body'); 226 | } 227 | window.setTimeout(function() { 228 | $.each(terms, function() { 229 | body.highlightText(this.toLowerCase(), 'highlighted'); 230 | }); 231 | }, 10); 232 | $('') 234 | .appendTo($('#searchbox')); 235 | } 236 | }, 237 | 238 | /** 239 | * init the domain index toggle buttons 240 | */ 241 | initIndexTable : function() { 242 | var togglers = $('img.toggler').click(function() { 243 | var src = $(this).attr('src'); 244 | var idnum = $(this).attr('id').substr(7); 245 | $('tr.cg-' + idnum).toggle(); 246 | if (src.substr(-9) === 'minus.png') 247 | $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); 248 | else 249 | $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); 250 | }).css('display', ''); 251 | if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { 252 | togglers.click(); 253 | } 254 | }, 255 | 256 | /** 257 | * helper function to hide the search marks again 258 | */ 259 | hideSearchWords : function() { 260 | $('#searchbox .highlight-link').fadeOut(300); 261 | $('span.highlighted').removeClass('highlighted'); 262 | }, 263 | 264 | /** 265 | * make the url absolute 266 | */ 267 | makeURL : function(relativeURL) { 268 | return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; 269 | }, 270 | 271 | /** 272 | * get the current relative url 273 | */ 274 | getCurrentURL : function() { 275 | var path = document.location.pathname; 276 | var parts = path.split(/\//); 277 | $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { 278 | if (this === '..') 279 | parts.pop(); 280 | }); 281 | var url = parts.join('/'); 282 | return path.substring(url.lastIndexOf('/') + 1, path.length - 1); 283 | }, 284 | 285 | initOnKeyListeners: function() { 286 | $(document).keydown(function(event) { 287 | var activeElementType = document.activeElement.tagName; 288 | // don't navigate when in search box or textarea 289 | if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT' 290 | && !event.altKey && !event.ctrlKey && !event.metaKey && !event.shiftKey) { 291 | switch (event.keyCode) { 292 | case 37: // left 293 | var prevHref = $('link[rel="prev"]').prop('href'); 294 | if (prevHref) { 295 | window.location.href = prevHref; 296 | return false; 297 | } 298 | case 39: // right 299 | var nextHref = $('link[rel="next"]').prop('href'); 300 | if (nextHref) { 301 | window.location.href = nextHref; 302 | return false; 303 | } 304 | } 305 | } 306 | }); 307 | } 308 | }; 309 | 310 | // quick alias for translations 311 | _ = Documentation.gettext; 312 | 313 | $(document).ready(function() { 314 | Documentation.init(); 315 | }); 316 | -------------------------------------------------------------------------------- /docs/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | var DOCUMENTATION_OPTIONS = { 2 | URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), 3 | VERSION: 'v0.1.0', 4 | LANGUAGE: 'None', 5 | COLLAPSE_INDEX: false, 6 | BUILDER: 'html', 7 | FILE_SUFFIX: '.html', 8 | LINK_SUFFIX: '.html', 9 | HAS_SOURCE: true, 10 | SOURCELINK_SUFFIX: '.txt', 11 | NAVIGATION_WITH_KEYS: false 12 | }; -------------------------------------------------------------------------------- /docs/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/file.png -------------------------------------------------------------------------------- /docs/_static/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/Lato/lato-bold.eot -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/Lato/lato-bold.ttf -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/Lato/lato-bold.woff -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/Lato/lato-bold.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-bolditalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/Lato/lato-bolditalic.eot -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-bolditalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/Lato/lato-bolditalic.ttf -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-bolditalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/Lato/lato-bolditalic.woff -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-bolditalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/Lato/lato-bolditalic.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/Lato/lato-italic.eot -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/Lato/lato-italic.ttf -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/Lato/lato-italic.woff -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/Lato/lato-italic.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/Lato/lato-regular.eot -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/Lato/lato-regular.ttf -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/Lato/lato-regular.woff -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/Lato/lato-regular.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/Roboto-Slab-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/Roboto-Slab-Bold.woff -------------------------------------------------------------------------------- /docs/_static/fonts/Roboto-Slab-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/Roboto-Slab-Bold.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/Roboto-Slab-Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/Roboto-Slab-Light.woff -------------------------------------------------------------------------------- /docs/_static/fonts/Roboto-Slab-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/Roboto-Slab-Light.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/Roboto-Slab-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/Roboto-Slab-Regular.woff -------------------------------------------------------------------------------- /docs/_static/fonts/Roboto-Slab-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/Roboto-Slab-Regular.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/Roboto-Slab-Thin.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/Roboto-Slab-Thin.woff -------------------------------------------------------------------------------- /docs/_static/fonts/Roboto-Slab-Thin.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/Roboto-Slab-Thin.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot -------------------------------------------------------------------------------- /docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf -------------------------------------------------------------------------------- /docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff -------------------------------------------------------------------------------- /docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot -------------------------------------------------------------------------------- /docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf -------------------------------------------------------------------------------- /docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff -------------------------------------------------------------------------------- /docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/_static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/_static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/_static/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/lato-bold-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/lato-bold-italic.woff -------------------------------------------------------------------------------- /docs/_static/fonts/lato-bold-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/lato-bold-italic.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/lato-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/lato-bold.woff -------------------------------------------------------------------------------- /docs/_static/fonts/lato-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/lato-bold.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/lato-normal-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/lato-normal-italic.woff -------------------------------------------------------------------------------- /docs/_static/fonts/lato-normal-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/lato-normal-italic.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/lato-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/lato-normal.woff -------------------------------------------------------------------------------- /docs/_static/fonts/lato-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/fonts/lato-normal.woff2 -------------------------------------------------------------------------------- /docs/_static/js/badge_only.js: -------------------------------------------------------------------------------- 1 | !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){}}); -------------------------------------------------------------------------------- /docs/_static/js/html5shiv-printshiv.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve HTML5 Shiv 3.7.3-pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),y.elements=c+" "+a,j(b)}function f(a){var b=x[a[v]];return b||(b={},w++,a[v]=w,x[w]=b),b}function g(a,c,d){if(c||(c=b),q)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():u.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||t.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),q)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return y.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(y,b.frag)}function j(a){a||(a=b);var d=f(a);return!y.shivCSS||p||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),q||i(a,d),a}function k(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(l(b)));return g}function l(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(A+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function m(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+A+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function n(a){for(var b=a.length;b--;)a[b].removeNode()}function o(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,e,g=f(a),h=a.namespaces,i=a.parentWindow;return!B||a.printShived?a:("undefined"==typeof h[A]&&h.add(A),i.attachEvent("onbeforeprint",function(){b();for(var f,g,h,i=a.styleSheets,j=[],l=i.length,n=Array(l);l--;)n[l]=i[l];for(;h=n.pop();)if(!h.disabled&&z.test(h.media)){try{f=h.imports,g=f.length}catch(o){g=0}for(l=0;g>l;l++)n.push(f[l]);try{j.push(h.cssText)}catch(o){}}j=m(j.reverse().join("")),e=k(a),d=c(a,j)}),i.attachEvent("onafterprint",function(){n(e),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var p,q,r="3.7.3",s=a.html5||{},t=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",w=0,x={};!function(){try{var a=b.createElement("a");a.innerHTML="",p="hidden"in a,q=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){p=!0,q=!0}}();var y={elements:s.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:r,shivCSS:s.shivCSS!==!1,supportsUnknownElements:q,shivMethods:s.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=y,j(b);var z=/^$|\b(?:all|print)\b/,A="html5shiv",B=!q&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();y.type+=" print",y.shivPrint=o,o(b),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document); -------------------------------------------------------------------------------- /docs/_static/js/html5shiv.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document); -------------------------------------------------------------------------------- /docs/_static/js/modernizr.min.js: -------------------------------------------------------------------------------- 1 | /* Modernizr 2.6.2 (Custom Build) | MIT & BSD 2 | * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load 3 | */ 4 | ;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a){var e=a[d];if(!G(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function I(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:F(f,"function")?f.bind(d||b):f}return!1}function J(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return F(b,"string")||F(b,"undefined")?H(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),I(e,b,c))}function K(){e.input=function(c){for(var d=0,e=c.length;d',a,""].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return y("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return J("flexWrap")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!F(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!J("indexedDB",a)},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")},s.borderradius=function(){return J("borderRadius")},s.boxshadow=function(){return J("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var L in s)C(s,L)&&(x=L.toLowerCase(),e[x]=s[L](),v.push((e[x]?"":"no-")+x));return e.input||K(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},D(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,e.prefixed=function(a,b,c){return b?J(a,b,c):J(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f"),n("table.docutils.footnote").wrap("
"),n("table.docutils.citation").wrap("
"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each((function(){var t=n(this);expand=n(''),expand.on("click",(function(n){return e.toggleCurrent(t),n.stopPropagation(),!1})),t.prepend(expand)}))},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),t=e.find('[href="'+n+'"]');if(0===t.length){var i=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(t=e.find('[href="#'+i.attr("id")+'"]')).length&&(t=e.find('[href="#"]'))}t.length>0&&($(".wy-menu-vertical .current").removeClass("current"),t.addClass("current"),t.closest("li.toctree-l1").addClass("current"),t.closest("li.toctree-l1").parent().addClass("current"),t.closest("li.toctree-l1").addClass("current"),t.closest("li.toctree-l2").addClass("current"),t.closest("li.toctree-l3").addClass("current"),t.closest("li.toctree-l4").addClass("current"),t.closest("li.toctree-l5").addClass("current"),t[0].scrollIntoView())}catch(n){console.log("Error expanding nav for anchor",n)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,t=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(t),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",(function(){this.linkScroll=!1}))},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current"),e.siblings().find("li.current").removeClass("current"),e.find("> ul li.current").removeClass("current"),e.toggleClass("current")}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:n.exports.ThemeNav,StickyNav:n.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],t=0;t0 62 | var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 63 | var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 64 | var s_v = "^(" + C + ")?" + v; // vowel in stem 65 | 66 | this.stemWord = function (w) { 67 | var stem; 68 | var suffix; 69 | var firstch; 70 | var origword = w; 71 | 72 | if (w.length < 3) 73 | return w; 74 | 75 | var re; 76 | var re2; 77 | var re3; 78 | var re4; 79 | 80 | firstch = w.substr(0,1); 81 | if (firstch == "y") 82 | w = firstch.toUpperCase() + w.substr(1); 83 | 84 | // Step 1a 85 | re = /^(.+?)(ss|i)es$/; 86 | re2 = /^(.+?)([^s])s$/; 87 | 88 | if (re.test(w)) 89 | w = w.replace(re,"$1$2"); 90 | else if (re2.test(w)) 91 | w = w.replace(re2,"$1$2"); 92 | 93 | // Step 1b 94 | re = /^(.+?)eed$/; 95 | re2 = /^(.+?)(ed|ing)$/; 96 | if (re.test(w)) { 97 | var fp = re.exec(w); 98 | re = new RegExp(mgr0); 99 | if (re.test(fp[1])) { 100 | re = /.$/; 101 | w = w.replace(re,""); 102 | } 103 | } 104 | else if (re2.test(w)) { 105 | var fp = re2.exec(w); 106 | stem = fp[1]; 107 | re2 = new RegExp(s_v); 108 | if (re2.test(stem)) { 109 | w = stem; 110 | re2 = /(at|bl|iz)$/; 111 | re3 = new RegExp("([^aeiouylsz])\\1$"); 112 | re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 113 | if (re2.test(w)) 114 | w = w + "e"; 115 | else if (re3.test(w)) { 116 | re = /.$/; 117 | w = w.replace(re,""); 118 | } 119 | else if (re4.test(w)) 120 | w = w + "e"; 121 | } 122 | } 123 | 124 | // Step 1c 125 | re = /^(.+?)y$/; 126 | if (re.test(w)) { 127 | var fp = re.exec(w); 128 | stem = fp[1]; 129 | re = new RegExp(s_v); 130 | if (re.test(stem)) 131 | w = stem + "i"; 132 | } 133 | 134 | // Step 2 135 | re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; 136 | if (re.test(w)) { 137 | var fp = re.exec(w); 138 | stem = fp[1]; 139 | suffix = fp[2]; 140 | re = new RegExp(mgr0); 141 | if (re.test(stem)) 142 | w = stem + step2list[suffix]; 143 | } 144 | 145 | // Step 3 146 | re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; 147 | if (re.test(w)) { 148 | var fp = re.exec(w); 149 | stem = fp[1]; 150 | suffix = fp[2]; 151 | re = new RegExp(mgr0); 152 | if (re.test(stem)) 153 | w = stem + step3list[suffix]; 154 | } 155 | 156 | // Step 4 157 | re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; 158 | re2 = /^(.+?)(s|t)(ion)$/; 159 | if (re.test(w)) { 160 | var fp = re.exec(w); 161 | stem = fp[1]; 162 | re = new RegExp(mgr1); 163 | if (re.test(stem)) 164 | w = stem; 165 | } 166 | else if (re2.test(w)) { 167 | var fp = re2.exec(w); 168 | stem = fp[1] + fp[2]; 169 | re2 = new RegExp(mgr1); 170 | if (re2.test(stem)) 171 | w = stem; 172 | } 173 | 174 | // Step 5 175 | re = /^(.+?)e$/; 176 | if (re.test(w)) { 177 | var fp = re.exec(w); 178 | stem = fp[1]; 179 | re = new RegExp(mgr1); 180 | re2 = new RegExp(meq1); 181 | re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 182 | if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) 183 | w = stem; 184 | } 185 | re = /ll$/; 186 | re2 = new RegExp(mgr1); 187 | if (re.test(w) && re2.test(w)) { 188 | re = /.$/; 189 | w = w.replace(re,""); 190 | } 191 | 192 | // and turn initial Y back to y 193 | if (firstch == "y") 194 | w = firstch.toLowerCase() + w.substr(1); 195 | return w; 196 | } 197 | } 198 | 199 | 200 | 201 | 202 | 203 | var splitChars = (function() { 204 | var result = {}; 205 | var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648, 206 | 1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702, 207 | 2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971, 208 | 2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345, 209 | 3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761, 210 | 3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823, 211 | 4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125, 212 | 8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695, 213 | 11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587, 214 | 43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141]; 215 | var i, j, start, end; 216 | for (i = 0; i < singles.length; i++) { 217 | result[singles[i]] = true; 218 | } 219 | var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709], 220 | [722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161], 221 | [1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568], 222 | [1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807], 223 | [1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047], 224 | [2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383], 225 | [2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450], 226 | [2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547], 227 | [2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673], 228 | [2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820], 229 | [2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946], 230 | [2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023], 231 | [3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173], 232 | [3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332], 233 | [3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481], 234 | [3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718], 235 | [3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791], 236 | [3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095], 237 | [4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205], 238 | [4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687], 239 | [4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968], 240 | [4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869], 241 | [5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102], 242 | [6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271], 243 | [6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592], 244 | [6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822], 245 | [6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167], 246 | [7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959], 247 | [7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143], 248 | [8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318], 249 | [8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483], 250 | [8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101], 251 | [10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567], 252 | [11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292], 253 | [12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444], 254 | [12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783], 255 | [12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311], 256 | [19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511], 257 | [42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774], 258 | [42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071], 259 | [43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263], 260 | [43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519], 261 | [43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647], 262 | [43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967], 263 | [44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295], 264 | [57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274], 265 | [64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007], 266 | [65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381], 267 | [65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]]; 268 | for (i = 0; i < ranges.length; i++) { 269 | start = ranges[i][0]; 270 | end = ranges[i][1]; 271 | for (j = start; j <= end; j++) { 272 | result[j] = true; 273 | } 274 | } 275 | return result; 276 | })(); 277 | 278 | function splitQuery(query) { 279 | var result = []; 280 | var start = -1; 281 | for (var i = 0; i < query.length; i++) { 282 | if (splitChars[query.charCodeAt(i)]) { 283 | if (start !== -1) { 284 | result.push(query.slice(start, i)); 285 | start = -1; 286 | } 287 | } else if (start === -1) { 288 | start = i; 289 | } 290 | } 291 | if (start !== -1) { 292 | result.push(query.slice(start)); 293 | } 294 | return result; 295 | } 296 | 297 | 298 | -------------------------------------------------------------------------------- /docs/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/minus.png -------------------------------------------------------------------------------- /docs/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/_static/plus.png -------------------------------------------------------------------------------- /docs/_static/pygments.css: -------------------------------------------------------------------------------- 1 | pre { line-height: 125%; margin: 0; } 2 | td.linenos pre { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; } 3 | span.linenos { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; } 4 | td.linenos pre.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; } 5 | span.linenos.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; } 6 | .highlight .hll { background-color: #ffffcc } 7 | .highlight { background: #f8f8f8; } 8 | .highlight .c { color: #408080; font-style: italic } /* Comment */ 9 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 10 | .highlight .k { color: #008000; font-weight: bold } /* Keyword */ 11 | .highlight .o { color: #666666 } /* Operator */ 12 | .highlight .ch { color: #408080; font-style: italic } /* Comment.Hashbang */ 13 | .highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */ 14 | .highlight .cp { color: #BC7A00 } /* Comment.Preproc */ 15 | .highlight .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */ 16 | .highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */ 17 | .highlight .cs { color: #408080; font-style: italic } /* Comment.Special */ 18 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ 19 | .highlight .ge { font-style: italic } /* Generic.Emph */ 20 | .highlight .gr { color: #FF0000 } /* Generic.Error */ 21 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 22 | .highlight .gi { color: #00A000 } /* Generic.Inserted */ 23 | .highlight .go { color: #888888 } /* Generic.Output */ 24 | .highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ 25 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 26 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 27 | .highlight .gt { color: #0044DD } /* Generic.Traceback */ 28 | .highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ 29 | .highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ 30 | .highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ 31 | .highlight .kp { color: #008000 } /* Keyword.Pseudo */ 32 | .highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ 33 | .highlight .kt { color: #B00040 } /* Keyword.Type */ 34 | .highlight .m { color: #666666 } /* Literal.Number */ 35 | .highlight .s { color: #BA2121 } /* Literal.String */ 36 | .highlight .na { color: #7D9029 } /* Name.Attribute */ 37 | .highlight .nb { color: #008000 } /* Name.Builtin */ 38 | .highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */ 39 | .highlight .no { color: #880000 } /* Name.Constant */ 40 | .highlight .nd { color: #AA22FF } /* Name.Decorator */ 41 | .highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */ 42 | .highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ 43 | .highlight .nf { color: #0000FF } /* Name.Function */ 44 | .highlight .nl { color: #A0A000 } /* Name.Label */ 45 | .highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ 46 | .highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ 47 | .highlight .nv { color: #19177C } /* Name.Variable */ 48 | .highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ 49 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 50 | .highlight .mb { color: #666666 } /* Literal.Number.Bin */ 51 | .highlight .mf { color: #666666 } /* Literal.Number.Float */ 52 | .highlight .mh { color: #666666 } /* Literal.Number.Hex */ 53 | .highlight .mi { color: #666666 } /* Literal.Number.Integer */ 54 | .highlight .mo { color: #666666 } /* Literal.Number.Oct */ 55 | .highlight .sa { color: #BA2121 } /* Literal.String.Affix */ 56 | .highlight .sb { color: #BA2121 } /* Literal.String.Backtick */ 57 | .highlight .sc { color: #BA2121 } /* Literal.String.Char */ 58 | .highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */ 59 | .highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ 60 | .highlight .s2 { color: #BA2121 } /* Literal.String.Double */ 61 | .highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ 62 | .highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */ 63 | .highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ 64 | .highlight .sx { color: #008000 } /* Literal.String.Other */ 65 | .highlight .sr { color: #BB6688 } /* Literal.String.Regex */ 66 | .highlight .s1 { color: #BA2121 } /* Literal.String.Single */ 67 | .highlight .ss { color: #19177C } /* Literal.String.Symbol */ 68 | .highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */ 69 | .highlight .fm { color: #0000FF } /* Name.Function.Magic */ 70 | .highlight .vc { color: #19177C } /* Name.Variable.Class */ 71 | .highlight .vg { color: #19177C } /* Name.Variable.Global */ 72 | .highlight .vi { color: #19177C } /* Name.Variable.Instance */ 73 | .highlight .vm { color: #19177C } /* Name.Variable.Magic */ 74 | .highlight .il { color: #666666 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /docs/_static/underscore.js: -------------------------------------------------------------------------------- 1 | // Underscore.js 1.3.1 2 | // (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc. 3 | // Underscore is freely distributable under the MIT license. 4 | // Portions of Underscore are inspired or borrowed from Prototype, 5 | // Oliver Steele's Functional, and John Resig's Micro-Templating. 6 | // For all details and documentation: 7 | // http://documentcloud.github.com/underscore 8 | (function(){function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case "[object String]":return a==String(c);case "[object Number]":return a!=+a?c!=+c:a==0?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source== 9 | c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if(typeof a!="object"||typeof c!="object")return false;for(var f=d.length;f--;)if(d[f]==a)return true;d.push(a);var f=0,g=true;if(e=="[object Array]"){if(f=a.length,g=f==c.length)for(;f--;)if(!(g=f in a==f in c&&q(a[f],c[f],d)))break}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return false;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&q(a[h],c[h],d))))break;if(g){for(h in c)if(b.has(c, 10 | h)&&!f--)break;g=!f}}d.pop();return g}var r=this,G=r._,n={},k=Array.prototype,o=Object.prototype,i=k.slice,H=k.unshift,l=o.toString,I=o.hasOwnProperty,w=k.forEach,x=k.map,y=k.reduce,z=k.reduceRight,A=k.filter,B=k.every,C=k.some,p=k.indexOf,D=k.lastIndexOf,o=Array.isArray,J=Object.keys,s=Function.prototype.bind,b=function(a){return new m(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else r._=b;b.VERSION="1.3.1";var j=b.each= 11 | b.forEach=function(a,c,d){if(a!=null)if(w&&a.forEach===w)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,f=a.length;e2;a== 12 | null&&(a=[]);if(y&&a.reduce===y)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(z&&a.reduceRight===z)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect= 13 | function(a,c,b){var e;E(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(A&&a.filter===A)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(B&&a.every===B)return a.every(c,b);j(a,function(a,g,h){if(!(e= 14 | e&&c.call(b,a,g,h)))return n});return e};var E=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(C&&a.some===C)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return n});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return p&&a.indexOf===p?a.indexOf(c)!=-1:b=E(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck= 15 | function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;bd?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a, 17 | c,d){d||(d=b.identity);for(var e=0,f=a.length;e>1;d(a[g])=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e=0;d--)b=[a[d].apply(this,b)];return b[0]}}; 24 | b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=J||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.defaults=function(a){j(i.call(arguments, 25 | 1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return q(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=o||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)}; 26 | b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!b.has(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"}; 27 | b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,b){return I.call(a,b)};b.noConflict=function(){r._=G;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};b.mixin=function(a){j(b.functions(a), 28 | function(c){K(c,b[c]=a[c])})};var L=0;b.uniqueId=function(a){var b=L++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var t=/.^/,u=function(a){return a.replace(/\\\\/g,"\\").replace(/\\'/g,"'")};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape||t,function(a,b){return"',_.escape("+ 29 | u(b)+"),'"}).replace(d.interpolate||t,function(a,b){return"',"+u(b)+",'"}).replace(d.evaluate||t,function(a,b){return"');"+u(b).replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var v=function(a,c){return c?b(a).chain():a},K=function(a,c){m.prototype[a]= 30 | function(){var a=i.call(arguments);H.call(a,this._wrapped);return v(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return v(d,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return v(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain= 31 | true;return this};m.prototype.value=function(){return this._wrapped}}).call(this); 32 | -------------------------------------------------------------------------------- /docs/contributing.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Contributing — dataclassframe v0.1.0 documentation 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 |
46 | 47 | 98 | 99 |
100 | 101 | 102 | 108 | 109 | 110 |
111 | 112 |
113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 |
131 | 132 |
    133 | 134 |
  • »
  • 135 | 136 |
  • Contributing
  • 137 | 138 | 139 |
  • 140 | 141 | 142 | View page source 143 | 144 | 145 |
  • 146 | 147 |
148 | 149 | 150 |
151 |
152 |
153 |
154 | 155 |
156 |

Contributing

157 |

Contributions are welcomed. Please fork and submit PR request. Code on GitHub.

158 |
159 | 160 | 161 |
162 | 163 |
164 |
165 | 166 | 172 | 173 | 174 |
175 | 176 |
177 |

178 | 179 | © Copyright 2020, Josh Levy-Kramer. MIT license 180 | 181 |

182 |
183 | 184 | 185 | 186 | Built with Sphinx using a 187 | 188 | theme 189 | 190 | provided by Read the Docs. 191 | 192 |
193 | 194 |
195 |
196 | 197 |
198 | 199 |
200 | 201 | 202 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | -------------------------------------------------------------------------------- /docs/genindex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Index — dataclassframe v0.1.0 documentation 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
45 | 46 | 97 | 98 |
99 | 100 | 101 | 107 | 108 | 109 |
110 | 111 |
112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 |
130 | 131 |
    132 | 133 |
  • »
  • 134 | 135 |
  • Index
  • 136 | 137 | 138 |
  • 139 | 140 | 141 | 142 |
  • 143 | 144 |
145 | 146 | 147 |
148 |
149 |
150 |
151 | 152 | 153 |

Index

154 | 155 |
156 | _ 157 | | A 158 | | C 159 | | D 160 | | F 161 | | H 162 | | I 163 | | T 164 | 165 |
166 |

_

167 | 168 | 172 |
173 | 174 |

A

175 | 176 | 180 |
181 | 182 |

C

183 | 184 | 188 | 192 |
193 | 194 |

D

195 | 196 | 200 |
201 | 202 |

F

203 | 204 | 208 |
209 | 210 |

H

211 | 212 | 216 |
217 | 218 |

I

219 | 220 | 224 |
225 | 226 |

T

227 | 228 | 232 |
233 | 234 | 235 | 236 |
237 | 238 |
239 |
240 | 241 | 242 |
243 | 244 |
245 |

246 | 247 | © Copyright 2020, Josh Levy-Kramer. MIT license 248 | 249 |

250 |
251 | 252 | 253 | 254 | Built with Sphinx using a 255 | 256 | theme 257 | 258 | provided by Read the Docs. 259 | 260 |
261 | 262 |
263 |
264 | 265 |
266 | 267 |
268 | 269 | 270 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | -------------------------------------------------------------------------------- /docs/getting_started.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Getting started — dataclassframe v0.1.0 documentation 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 |
47 | 48 | 103 | 104 |
105 | 106 | 107 | 113 | 114 | 115 |
116 | 117 |
118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 |
136 | 137 |
    138 | 139 |
  • »
  • 140 | 141 |
  • Getting started
  • 142 | 143 | 144 |
  • 145 | 146 | 147 | View page source 148 | 149 | 150 |
  • 151 | 152 |
153 | 154 | 155 |
156 |
157 |
158 |
159 | 160 |
161 |

Getting started

162 |
163 |

Installing

164 |

Get the latest version using pip/PyPi

165 |
pip install dataclassframe
166 | 
167 |
168 |
169 |
170 |

Example usage

171 |

A container data-type for dataclasses…

172 |
from dataclasses import dataclass
173 | from dataclassframe import DataClassFrame
174 | 
175 | @dataclass
176 | class ExampleDC:
177 |     field1: str
178 |     field2: int
179 | 
180 | records = [
181 |     ExampleDC('a', 1),
182 |     ExampleDC('b', 2),
183 |     ExampleDC('c', 3),
184 | ]
185 | 
186 | dcf = DataClassFrame(
187 |         record_class=ExampleDC,
188 |         data=records,
189 |         index=['field1', 'field2']
190 | )
191 | 
192 |
193 |

Which acts like a ordered dictionary with multi-indexing…

194 |
# Obtain record `ExampleDC('b', 2)`
195 | row_idx = dcf.iat[1]    # Using positional index
196 | row_f1 = dcf.at['b']    # Using index of `field1`
197 | row_f2 = dcf.at[:, 2]   # Using index of `field2`
198 | assert row_idx == row_f1 == row_f2
199 | 
200 |
201 |

With bulk operations on the columns..

202 |
assert dcf.cols.field2.sum() == 6
203 | 
204 |
205 |

Works nicely with Python 3 type hints…

206 |
dcf: DataClassFrame[ExampleDC]
207 | dcf.iat[1]: ExampleDC
208 | 
209 |
210 |
211 |
212 | 213 | 214 |
215 | 216 |
217 |
218 | 219 | 227 | 228 | 229 |
230 | 231 |
232 |

233 | 234 | © Copyright 2020, Josh Levy-Kramer. MIT license 235 | 236 |

237 |
238 | 239 | 240 | 241 | Built with Sphinx using a 242 | 243 | theme 244 | 245 | provided by Read the Docs. 246 | 247 |
248 | 249 |
250 |
251 | 252 |
253 | 254 |
255 | 256 | 257 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Indices and tables — dataclassframe v0.1.0 documentation 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 |
46 | 47 | 98 | 99 |
100 | 101 | 102 | 108 | 109 | 110 |
111 | 112 |
113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 |
131 | 132 |
    133 | 134 |
  • »
  • 135 | 136 |
  • Indices and tables
  • 137 | 138 | 139 |
  • 140 | 141 | 142 | View page source 143 | 144 | 145 |
  • 146 | 147 |
148 | 149 | 150 |
151 |
152 |
153 |
154 | 155 |
156 |

Contents:

157 | 170 |
171 |
172 |

Indices and tables

173 | 178 |
179 | 180 | 181 |
182 | 183 |
184 |
185 | 186 | 192 | 193 | 194 |
195 | 196 |
197 |

198 | 199 | © Copyright 2020, Josh Levy-Kramer. MIT license 200 | 201 |

202 |
203 | 204 | 205 | 206 | Built with Sphinx using a 207 | 208 | theme 209 | 210 | provided by Read the Docs. 211 | 212 |
213 | 214 |
215 |
216 | 217 |
218 | 219 |
220 | 221 | 222 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | -------------------------------------------------------------------------------- /docs/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshlk/dataclassframe/2135c35f7a6495e8b482055fd74a2a4ba8c8a90b/docs/objects.inv -------------------------------------------------------------------------------- /docs/py-modindex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Python Module Index — dataclassframe v0.1.0 documentation 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 |
52 | 53 | 102 | 103 |
104 | 105 | 106 | 112 | 113 | 114 |
115 | 116 |
117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 |
135 | 136 |
    137 | 138 |
  • »
  • 139 | 140 |
  • Python Module Index
  • 141 | 142 | 143 |
  • 144 | 145 |
  • 146 | 147 |
148 | 149 | 150 |
151 |
152 |
153 |
154 | 155 | 156 |

Python Module Index

157 | 158 |
159 | d 160 |
161 | 162 | 163 | 164 | 166 | 167 | 168 | 171 |
 
165 | d
169 | dataclassframe 170 |
172 | 173 | 174 |
175 | 176 |
177 |
178 | 179 | 180 |
181 | 182 |
183 |

184 | 185 | © Copyright 2020, Josh Levy-Kramer. MIT license 186 | 187 |

188 |
189 | 190 | 191 | 192 | Built with Sphinx using a 193 | 194 | theme 195 | 196 | provided by Read the Docs. 197 | 198 |
199 | 200 |
201 |
202 | 203 |
204 | 205 |
206 | 207 | 208 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | -------------------------------------------------------------------------------- /docs/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Search — dataclassframe v0.1.0 documentation 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 |
47 | 48 | 99 | 100 |
101 | 102 | 103 | 109 | 110 | 111 |
112 | 113 |
114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 |
132 | 133 |
    134 | 135 |
  • »
  • 136 | 137 |
  • Search
  • 138 | 139 | 140 |
  • 141 | 142 | 143 | 144 |
  • 145 | 146 |
147 | 148 | 149 |
150 |
151 |
152 |
153 | 154 | 161 | 162 | 163 |
164 | 165 |
166 | 167 |
168 | 169 |
170 |
171 | 172 | 173 |
174 | 175 |
176 |

177 | 178 | © Copyright 2020, Josh Levy-Kramer. MIT license 179 | 180 |

181 |
182 | 183 | 184 | 185 | Built with Sphinx using a 186 | 187 | theme 188 | 189 | provided by Read the Docs. 190 | 191 |
192 | 193 |
194 |
195 | 196 |
197 | 198 |
199 | 200 | 201 | 206 | 207 | 208 | 209 | 210 | 211 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | -------------------------------------------------------------------------------- /docs/searchindex.js: -------------------------------------------------------------------------------- 1 | Search.setIndex({docnames:["api","contributing","getting_started","index","welcome"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,"sphinx.ext.viewcode":1,sphinx:56},filenames:["api.rst","contributing.md","getting_started.md","index.rst","welcome.md"],objects:{"dataclassframe.DataClassFrame":{__init__:[0,1,1,""],at:[0,1,1,""],cols:[0,1,1,""],copy:[0,1,1,""],from_dataframe:[0,1,1,""],head:[0,1,1,""],iat:[0,1,1,""],to_dataframe:[0,1,1,""]},dataclassframe:{DataClassFrame:[0,0,1,""]}},objnames:{"0":["py","class","Python class"],"1":["py","method","Python method"]},objtypes:{"0":"py:class","1":"py:method"},terms:{"class":[0,2],"default":[],"function":[],"import":2,"int":[0,2],"new":[],"return":0,"static":[],"true":0,"while":4,The:[0,4],Using:2,With:2,__class_getitem__:[],__dict__:[],__doc__:[],__init__:0,__init_subclass__:[],__module__:[],__new__:[],__orig_bases__:[],__parameters__:[],__repr__:[],__slots__:[],__weakref__:[],abil:4,access:0,accur:[],act:2,all:0,api:3,arg:0,assert:2,attribut:[],bar:0,base:4,benefit:4,bidirect:4,bool:0,both:4,bulk:[2,4],call:[],classmethod:0,cls:[],code:[1,4],col:[0,2],collect:4,column:[0,2,4],combin:0,contain:[0,2,4],content:3,contribut:3,convert:0,copi:0,core:0,creat:0,data:[0,2,4],dataclass:[0,2,4],dataclass_to_empty_datafram:[],dataclassfram:[2,3],dataclassframe_:0,datafram:[0,4],dcf:2,deep:0,defin:4,design:4,dictionari:[0,2,4],document:3,doe:[],each:0,easier:4,effect:0,effici:4,element:0,enabl:4,ergonom:4,exampl:[0,3],exampledc:2,extend:[],fast:4,field1:2,field2:2,field:[0,4],first:0,foo:0,footprint:4,fork:1,frame:0,from:2,from_datafram:0,from_record:[],gener:[],get:3,github:1,good:4,has:4,have:4,head:0,help:[],hint:2,iat:[0,2],immut:4,implement:[],index:[0,2,3,4],initi:[],instal:3,invers:4,iter:0,joint:0,kei:[0,4],keyerror:0,kwarg:[],kwd:0,larg:4,last:0,latest:2,layout:4,like:[0,2],list:0,mai:[],make:4,mappingproxi:[],memori:4,method:4,modul:3,multi:[2,4],multipl:4,must:0,necessari:4,nice:2,none:0,noth:[],numer:4,object:[],obtain:2,oper:[2,4],optimis:4,option:0,order:2,orient:4,otherwis:0,output:0,overridden:[],page:3,panda:[0,4],param:[],paramet:0,perform:0,pip:2,pleas:1,posit:[0,2],prevent:0,product:4,project:4,properti:0,provid:[0,4],pypi:2,python:2,rais:0,record:[0,2,4],record_class:[0,2],recordt:0,refactor:4,refer:[],repr:[],request:1,rich:4,row:0,row_f1:2,row_f2:2,row_idx:2,same:0,search:3,second:0,see:[],self:0,seri:0,set:[0,4],shape:4,side:0,signatur:[],singl:0,smaller:4,sourc:0,start:3,staticmethod:[],store:4,str:[0,2],string:4,subclass:[],submit:1,suitabl:4,sum:[0,2],thi:4,to_datafram:0,type:[0,2,4],understand:4,union:0,uniqu:0,usag:3,use:[0,4],user:4,using:[0,2,4],validate_datafram:[],valu:0,vectoris:4,version:2,weak:[],welcom:[1,3],well:4,when:4,which:[2,4],work:2},titles:["API","Contributing","Getting started","Indices and tables","Welcome to dataclassframe\u2019s documentation!"],titleterms:{api:0,contribut:1,dataclassfram:[0,4],document:4,exampl:2,get:2,indic:3,instal:2,start:2,tabl:3,usag:2,welcom:4}}) -------------------------------------------------------------------------------- /docs/welcome.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Welcome to dataclassframe’s documentation! — dataclassframe v0.1.0 documentation 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 |
47 | 48 | 99 | 100 |
101 | 102 | 103 | 109 | 110 | 111 |
112 | 113 |
114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 |
132 | 133 |
    134 | 135 |
  • »
  • 136 | 137 |
  • Welcome to dataclassframe’s documentation!
  • 138 | 139 | 140 |
  • 141 | 142 | 143 | View page source 144 | 145 | 146 |
  • 147 | 148 |
149 | 150 | 151 |
152 |
153 |
154 |
155 | 156 |
157 |

Welcome to dataclassframe’s documentation!

158 |

A dataclass container with multi-indexing and bulk operations. Provides the typed benefits and ergonomics of dataclasses while having the efficiency of Pandas dataframes.

159 |

The container is based on data-oriented design by optimising the memory layout of the stored data, providing fast bulk operations and a smaller memory footprint for large collections. Bulk operations are enabled using Pandas which has a rich set of vectorised methods for both numerical and string data types.

160 |

Multi-indexing provides the ability to use multiple fields as keys to index the records. This is suitable for bidirectional and inverse dictionary keys.

161 |

A DataClassFrame provides good ergonomics for production code as columns are immutable and columns/data types are well defined by the dataclasses. This makes it easier for users to understand the “shape” of the data in large projects and refactor when necessary.

162 |
163 | 164 | 165 |
166 | 167 |
168 |
169 | 170 | 178 | 179 | 180 |
181 | 182 |
183 |

184 | 185 | © Copyright 2020, Josh Levy-Kramer. MIT license 186 | 187 |

188 |
189 | 190 | 191 | 192 | Built with Sphinx using a 193 | 194 | theme 195 | 196 | provided by Read the Docs. 197 | 198 |
199 | 200 |
201 |
202 | 203 |
204 | 205 |
206 | 207 | 208 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | -------------------------------------------------------------------------------- /docs_source/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = . 9 | BUILDDIR = _build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /docs_source/api.rst: -------------------------------------------------------------------------------- 1 | ============ 2 | API 3 | ============ 4 | 5 | :mod:`dataclassframe` 6 | ===================== 7 | 8 | .. autoclass:: dataclassframe.DataClassFrame 9 | :members: 10 | :undoc-members: 11 | :inherited-members: -------------------------------------------------------------------------------- /docs_source/conf.py: -------------------------------------------------------------------------------- 1 | # Configuration file for the Sphinx documentation builder. 2 | # 3 | # This file only contains a selection of the most common options. For a full 4 | # list see the documentation: 5 | # https://www.sphinx-doc.org/en/master/usage/configuration.html 6 | 7 | # -- Path setup -------------------------------------------------------------- 8 | 9 | # If extensions (or modules to document with autodoc) are in another directory, 10 | # add these directories to sys.path here. If the directory is relative to the 11 | # documentation root, use os.path.abspath to make it absolute, like shown here. 12 | # 13 | import os 14 | import sys 15 | sys.path.insert(0, os.path.abspath('../')) 16 | import sphinx_rtd_theme 17 | 18 | # -- Project information ----------------------------------------------------- 19 | 20 | project = 'dataclassframe' 21 | copyright = '2020, Josh Levy-Kramer. MIT license' 22 | author = 'Josh Levy-Kramer' 23 | 24 | # The full version, including alpha/beta/rc tags 25 | release = 'v0.1.0' 26 | 27 | 28 | # -- General configuration --------------------------------------------------- 29 | 30 | # Add any Sphinx extension module names here, as strings. They can be 31 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 32 | # ones. 33 | extensions = [ 34 | 'sphinx.ext.autodoc', 35 | 'sphinx.ext.viewcode', 36 | 'recommonmark', 37 | "sphinx_rtd_theme", 38 | "sphinx.ext.napoleon" 39 | ] 40 | 41 | napoleon_google_docstring = True 42 | napoleon_use_param = False 43 | napoleon_use_ivar = True 44 | napoleon_include_init_with_doc = True 45 | napoleon_type_aliases = { 46 | "DataClassFrame": "dataclassframe.DataClassFrame", 47 | "DataFrame": "pandas.DataFrame", 48 | } 49 | 50 | autodoc_member_order = 'groupwise' 51 | 52 | # Add any paths that contain templates here, relative to this directory. 53 | templates_path = ['_templates'] 54 | 55 | # List of patterns, relative to source directory, that match files and 56 | # directories to ignore when looking for source files. 57 | # This pattern also affects html_static_path and html_extra_path. 58 | exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] 59 | 60 | 61 | # -- Options for HTML output ------------------------------------------------- 62 | 63 | # The theme to use for HTML and HTML Help pages. See the documentation for 64 | # a list of builtin themes. 65 | # 66 | html_theme = 'sphinx_rtd_theme' #'alabaster' 67 | 68 | # Add any paths that contain custom static files (such as style sheets) here, 69 | # relative to this directory. They are copied after the builtin static files, 70 | # so a file named "default.css" will overwrite the builtin "default.css". 71 | html_static_path = ['_static'] 72 | 73 | 74 | # -- Added by Josh 75 | 76 | # Add markdown as a source suffix 77 | source_suffix = { 78 | '.rst': 'restructuredtext', 79 | '.txt': 'markdown', 80 | '.md': 'markdown', 81 | } -------------------------------------------------------------------------------- /docs_source/contributing.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Contributions are welcomed. Please fork and submit PR request. Code on [GitHub](https://github.com/joshlk/dataclassframe). -------------------------------------------------------------------------------- /docs_source/getting_started.md: -------------------------------------------------------------------------------- 1 | # Getting started 2 | 3 | ## Installing 4 | 5 | Get the latest version using pip/PyPi 6 | 7 | ```shell 8 | pip install dataclassframe 9 | ``` 10 | 11 | ## Example usage 12 | 13 | A container data-type for dataclasses... 14 | ```python 15 | from dataclasses import dataclass 16 | from dataclassframe import DataClassFrame 17 | 18 | @dataclass 19 | class ExampleDC: 20 | field1: str 21 | field2: int 22 | 23 | records = [ 24 | ExampleDC('a', 1), 25 | ExampleDC('b', 2), 26 | ExampleDC('c', 3), 27 | ] 28 | 29 | dcf = DataClassFrame( 30 | record_class=ExampleDC, 31 | data=records, 32 | index=['field1', 'field2'] 33 | ) 34 | ``` 35 | 36 | Which acts like a ordered dictionary with multi-indexing... 37 | ```python 38 | # Obtain record `ExampleDC('b', 2)` 39 | row_idx = dcf.iat[1] # Using positional index 40 | row_f1 = dcf.at['b'] # Using index of `field1` 41 | row_f2 = dcf.at[:, 2] # Using index of `field2` 42 | assert row_idx == row_f1 == row_f2 43 | ``` 44 | 45 | With bulk operations on the columns.. 46 | ```python 47 | assert dcf.cols.field2.sum() == 6 48 | ``` 49 | 50 | Works nicely with Python 3 type hints... 51 | ```python 52 | dcf: DataClassFrame[ExampleDC] 53 | dcf.iat[1]: ExampleDC 54 | ``` 55 | -------------------------------------------------------------------------------- /docs_source/index.rst: -------------------------------------------------------------------------------- 1 | .. dataclassframe documentation master file, created by 2 | sphinx-quickstart on Tue Oct 27 09:45:39 2020. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | :caption: Contents: 9 | 10 | welcome 11 | getting_started 12 | api 13 | contributing 14 | 15 | Indices and tables 16 | ================== 17 | 18 | * :ref:`genindex` 19 | * :ref:`modindex` 20 | * :ref:`search` 21 | -------------------------------------------------------------------------------- /docs_source/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=. 11 | set BUILDDIR=_build 12 | 13 | if "%1" == "" goto help 14 | 15 | %SPHINXBUILD% >NUL 2>NUL 16 | if errorlevel 9009 ( 17 | echo. 18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 19 | echo.installed, then set the SPHINXBUILD environment variable to point 20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 21 | echo.may add the Sphinx directory to PATH. 22 | echo. 23 | echo.If you don't have Sphinx installed, grab it from 24 | echo.http://sphinx-doc.org/ 25 | exit /b 1 26 | ) 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /docs_source/welcome.md: -------------------------------------------------------------------------------- 1 | # Welcome to dataclassframe's documentation! 2 | 3 | A dataclass container with multi-indexing and bulk operations. Provides the typed benefits and ergonomics of dataclasses while having the efficiency of Pandas dataframes. 4 | 5 | The container is based on data-oriented design by optimising the memory layout of the stored data, providing fast bulk operations and a smaller memory footprint for large collections. Bulk operations are enabled using Pandas which has a rich set of vectorised methods for both numerical and string data types. 6 | 7 | Multi-indexing provides the ability to use multiple fields as keys to index the records. This is suitable for bidirectional and inverse dictionary keys. 8 | 9 | A DataClassFrame provides good ergonomics for production code as columns are immutable and columns/data types are well defined by the dataclasses. This makes it easier for users to understand the "shape" of the data in large projects and refactor when necessary. -------------------------------------------------------------------------------- /pytest.ini: -------------------------------------------------------------------------------- 1 | [pytest] 2 | testpaths = 3 | dataclassframe 4 | norecursedirs=dist build .tox scripts 5 | addopts = 6 | -r a 7 | -v -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | pandas 2 | dataclasses;python_version<"3.7" 3 | -------------------------------------------------------------------------------- /requirements_dev.txt: -------------------------------------------------------------------------------- 1 | pytest 2 | wheel 3 | setuptools 4 | twine 5 | sphinx>=3.2.1 6 | codecov 7 | recommonmark 8 | sphinx-rtd-theme 9 | bump2version 10 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [metadata] 2 | name = dataclassframe 3 | version = 0.1.0 4 | description = A dataclass container with multi-indexing and bulk operations 5 | long_description = file: README.md 6 | long_description_content_type = text/markdown 7 | license = MIT License 8 | author = Josh Levy-Kramer 9 | url = https://github.com/joshlk/dataclassframe 10 | download_urls = https://pypi.org/project/dataclassframe 11 | project_urls = 12 | Documentation = https://joshlk.github.io/dataclassframe 13 | Code = https://github.com/joshlk/dataclassframe 14 | Issue tracker = https://github.com/joshlk/dataclassframe/issues 15 | classifiers = 16 | Development Status :: 5 - Production/Stable 17 | Intended Audience :: Developers 18 | Topic :: Utilities 19 | License :: OSI Approved :: MIT License 20 | Programming Language :: Python :: 3 21 | 22 | [options] 23 | zip_safe = False 24 | python_requires = >=3.6 25 | packages = find: 26 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | """ 4 | Based on template: https://github.com/FedericoStra/cython-package-example 5 | """ 6 | 7 | from setuptools import setup 8 | 9 | with open("requirements.txt") as fp: 10 | install_requires = fp.read().strip().split("\n") 11 | 12 | with open("requirements_dev.txt") as fp: 13 | dev_requires = fp.read().strip().split("\n") 14 | 15 | setup( 16 | install_requires=install_requires, 17 | extras_require={ 18 | "dev": dev_requires, 19 | "docs": ["sphinx", "sphinx-rtd-theme"] 20 | } 21 | ) 22 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | # Needed for setup.py to work correctly (no idea why) 2 | [tox] 3 | envlist = py{36,37,38} 4 | 5 | [testenv] 6 | basepython = 7 | py34: python3.6 8 | py35: python3.7 9 | py36: python3.8 10 | deps = 11 | check-manifest 12 | readme_renderer 13 | flake8 14 | pytest 15 | commands = 16 | check-manifest --ignore tox.ini,tests* 17 | python setup.py check -m -r -s 18 | flake8 . 19 | py.test tests 20 | [flake8] 21 | exclude = .tox,*.egg,build,data 22 | select = E,W,F --------------------------------------------------------------------------------