Skip to content

Commit

Permalink
Updated docs and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
rsheftel committed Oct 29, 2019
1 parent e0a9b28 commit d8569e3
Show file tree
Hide file tree
Showing 13 changed files with 842 additions and 864 deletions.
46 changes: 34 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,39 +19,61 @@ Documentation
-------------
http://raccoon.readthedocs.io/en/latest/

Source location
~~~~~~~~~~~~~~~
Hosted on GitHub: https://github.com/rsheftel/raccoon

Overview
--------
Raccoon is a lightweight DataFrame and Series implementation inspired by the phenomenal Pandas package for the one use
case where Pandas is known to be sub-optimal: DataFrames that grow in size by rows frequently in the code. Additionally
Raccoon DataFrames can be parametrized to be sorted so that additions to the DataFrame keep the index in sorted order
to speed inserts and retrievals.
case where Pandas is known to be sub-optimal: DataFrames and Series that grow in size by rows frequently in the code.
Additionally Raccoon DataFrames and Series can be parametrized to be sorted so that additions to the DataFrame keep the
index in sorted order to speed inserts and retrievals.

A simple speed comparison of Raccoon vs Pandas for typical functionality is located in the documentation.

Inspiration
-----------
Pandas DataFrames are excellent multi-purpose data structures for data management and analysis. One of the use cases
I had was to use DataFrames as a type of in-memory database table. The issue was that this required lots of growing
the rows of the DataFrame, something that is known to be slow in Pandas. The reason it is slow in Pandas is that the
underlying data structure is numpy which does a complete copy of the data when the size of the array grows.
~~~~~~~~~~~
Pandas DataFrames and Series are excellent multi-purpose data structures for data management and analysis. One of the
use cases I had was to use DataFrames as a type of in-memory database table. The issue was that this required lots of
growing the rows of the DataFrame, something that is known to be slow in Pandas. The reason it is slow in Pandas is that
the underlying data structure is numpy which does a complete copy of the data when the size of the array grows.

Functionality
-------------
~~~~~~~~~~~~~
Raccoon implements what is needed to use the DataFrame as an in memory store of index and column data structure
supporting simple and tuple indexes to mimic the hierarchical indexes of Pandas. The methods included are primarily
about setting values of the data frame, growing and appending the data frame and getting values from the data frame.
The raccoon DataFrame is not intended for math operations like pandas and only limited basic math methods are included.

Underlying Data Structure
~~~~~~~~~~~~~~~~~~~~~~~~~
Raccoon uses the standard built in lists as its default underlying data structure. There is an option on object
construction to use any other drop-in replacement for lists. For example the fast blist package
http://stutzbachenterprises.com/blist/ could be used as a list replacement for the underlying data structure.

Why Raccoon?
------------
~~~~~~~~~~~~
According to wikipedia some scientists believe the panda is related to the raccoon

Contributing
------------
~~~~~~~~~~~~
Contribution in the form of pull requests are welcome. Use pytest to run the test suite. Be sure any new additions
come with accompanying tests.

Future
------
~~~~~~
This package serves the needs it was originally created for. Any future additions by myself will be driven by my own
needs, but it is completely open source to I encourage anyone to add on and expand.

My hope is that one day Pandas solves the speed problem with growing DataFrames and this package becomes obsolete.

Python Version
~~~~~~~~~~~~~~
Raccoon requires Python 3.4 or greater. Python 2.7 support was eliminated as of version 3.0. If you need to use raccoon
with Python 2.7 use any version less than 3.0

Helper scripts
~~~~~~~~~~~~~~
There is helper function to generate these docs from the source code. On windows cd into the docs directory and
execute make_docs.bat from the command line. To run the test coverage report run the coverage.sh script.
3 changes: 2 additions & 1 deletion docs/change_log.rst
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ Series
- Python 2.7 support is dropped. This and all future releases are Python3 only
- .show() method has been renamed .print() to be consistent with Python standards
- Major change to the API for using drop-in replacements like blist and removing blist as an installation requirement.

The refactoring was driven by two needs. The first was to consistently accommodate other drop-in list replacements.
The second was that blist was no longer maintained and having it as a dependency for the entire raccoon package
created difficulties with installation. Now the sole package dependency is tabulate and that is a pure python package.
Expand All @@ -166,7 +167,7 @@ created difficulties with installation. Now the sole package dependency is tabul
- blist does not have a published wheel on PyPi which makes it a difficult requirement for most people to install
- the conda blist package does not support Python 3.7 on Windows
- Because of the following error it will cease working in 3.8 if not resolved and there seems to be no active development:
+ Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
+ Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working

*Can I still use blist?*

Expand Down
6 changes: 5 additions & 1 deletion docs/convert_pandas.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@

Convert to and from Pandas DataFrames
=====================================

There are no built in methods for the conversions but these functions
below should work in most basic instances.

.. code:: python
# remove comment to use latest development version
import sys; sys.path.insert(0, '../')
.. code:: python
import raccoon as rc
Expand Down
54 changes: 1 addition & 53 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,59 +1,7 @@
.. Raccoon documentation master file, created by
sphinx-quickstart on Fri Jul 29 08:26:04 2016.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Raccoon documentation
=====================
Overview
--------
Raccoon is a lightweight DataFrame and Series implementation inspired by the phenomenal Pandas package for the one use
case where Pandas is known to be sub-optimal: DataFrames and Series that grow in size by rows frequently in the code.
A simple speed comparison is below in the contents.

Source location
~~~~~~~~~~~~~~~
Hosted on GitHub: https://github.com/rsheftel/raccoon

Inspiration
~~~~~~~~~~~
Pandas DataFrames and Series are excellent multi-purpose data structures for data management and analysis. One of the
use cases I had was to use DataFrames as a type of in-memory database table. The issue was that this required lots of
growing the rows of the DataFrame, something that is known to be slow in Pandas. The reason it is slow in Pandas is
that the underlying data structure is numpy which does a complete copy of the data when the size of the array grows.

Functionality
~~~~~~~~~~~~~
Raccoon implements what is needed to use the DataFrame as an in memory store of index and column data structure
supporting simple and tuple indexes to mimic the hierarchical indexes of Pandas. The methods included are primarily
about setting values of the data frame, growing and appending the data frame and getting values from the data frame.
The raccoon DataFrame is not intended for math operations like pandas and only limited basic math methods are included.

Underlying Data Structure
~~~~~~~~~~~~~~~~~~~~~~~~~
Raccoon uses the standard built in lists. There is an option on object construction to use fast blist
http://stutzbachenterprises.com/blist/ list replacement for the underlying data structure.

Why Raccoon?
~~~~~~~~~~~~
According to wikipedia some scientists believe the panda is related to the raccoon

Future
~~~~~~
This package serves the needs it was originally created for. Any future additions by myself will be driven by my own
needs, but it is completely open source to I encourage anyone to add on and expand.

My hope is that one day Pandas solves the speed problem with growing DataFrames and this package becomes obsolete.

Python Version
~~~~~~~~~~~~~~
Raccoon requires Python 3.4 or greater. Python 2.7 support was eliminated as of version 3.0. If you need to use raccoon
with Python 2.7 use any version less than 3.0

Helper scripts
~~~~~~~~~~~~~~
There is helper function to generate these docs from the source code. On windows cd into the docs directory and
execute make_docs.bat from the command line. To run the test coverage report run the coverage.sh script.
.. include:: ../README.rst

Updates
-------
Expand Down
46 changes: 23 additions & 23 deletions docs/raccoon.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,43 @@ raccoon package
Submodules
----------

raccoon\.dataframe module
-------------------------
raccoon.dataframe module
------------------------

.. automodule:: raccoon.dataframe
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

raccoon\.series module
----------------------
raccoon.series module
---------------------

.. automodule:: raccoon.series
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

raccoon\.sort\_utils module
---------------------------
raccoon.sort\_utils module
--------------------------

.. automodule:: raccoon.sort_utils
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

raccoon\.utils module
---------------------
raccoon.utils module
--------------------

.. automodule:: raccoon.utils
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------

.. automodule:: raccoon
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:
Loading

0 comments on commit d8569e3

Please sign in to comment.