Skip to content

Commit d8569e3

Browse files
committed
Updated docs and examples
1 parent e0a9b28 commit d8569e3

13 files changed

+842
-864
lines changed

README.rst

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,39 +19,61 @@ Documentation
1919
-------------
2020
http://raccoon.readthedocs.io/en/latest/
2121

22+
Source location
23+
~~~~~~~~~~~~~~~
24+
Hosted on GitHub: https://github.com/rsheftel/raccoon
25+
2226
Overview
2327
--------
2428
Raccoon is a lightweight DataFrame and Series implementation inspired by the phenomenal Pandas package for the one use
25-
case where Pandas is known to be sub-optimal: DataFrames that grow in size by rows frequently in the code. Additionally
26-
Raccoon DataFrames can be parametrized to be sorted so that additions to the DataFrame keep the index in sorted order
27-
to speed inserts and retrievals.
29+
case where Pandas is known to be sub-optimal: DataFrames and Series that grow in size by rows frequently in the code.
30+
Additionally Raccoon DataFrames and Series can be parametrized to be sorted so that additions to the DataFrame keep the
31+
index in sorted order to speed inserts and retrievals.
32+
33+
A simple speed comparison of Raccoon vs Pandas for typical functionality is located in the documentation.
2834

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

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

49+
Underlying Data Structure
50+
~~~~~~~~~~~~~~~~~~~~~~~~~
51+
Raccoon uses the standard built in lists as its default underlying data structure. There is an option on object
52+
construction to use any other drop-in replacement for lists. For example the fast blist package
53+
http://stutzbachenterprises.com/blist/ could be used as a list replacement for the underlying data structure.
54+
4355
Why Raccoon?
44-
------------
56+
~~~~~~~~~~~~
4557
According to wikipedia some scientists believe the panda is related to the raccoon
4658

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

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

5769
My hope is that one day Pandas solves the speed problem with growing DataFrames and this package becomes obsolete.
70+
71+
Python Version
72+
~~~~~~~~~~~~~~
73+
Raccoon requires Python 3.4 or greater. Python 2.7 support was eliminated as of version 3.0. If you need to use raccoon
74+
with Python 2.7 use any version less than 3.0
75+
76+
Helper scripts
77+
~~~~~~~~~~~~~~
78+
There is helper function to generate these docs from the source code. On windows cd into the docs directory and
79+
execute make_docs.bat from the command line. To run the test coverage report run the coverage.sh script.

docs/change_log.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ Series
157157
- Python 2.7 support is dropped. This and all future releases are Python3 only
158158
- .show() method has been renamed .print() to be consistent with Python standards
159159
- Major change to the API for using drop-in replacements like blist and removing blist as an installation requirement.
160+
160161
The refactoring was driven by two needs. The first was to consistently accommodate other drop-in list replacements.
161162
The second was that blist was no longer maintained and having it as a dependency for the entire raccoon package
162163
created difficulties with installation. Now the sole package dependency is tabulate and that is a pure python package.
@@ -166,7 +167,7 @@ created difficulties with installation. Now the sole package dependency is tabul
166167
- blist does not have a published wheel on PyPi which makes it a difficult requirement for most people to install
167168
- the conda blist package does not support Python 3.7 on Windows
168169
- Because of the following error it will cease working in 3.8 if not resolved and there seems to be no active development:
169-
+ Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
170+
+ Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
170171

171172
*Can I still use blist?*
172173

docs/convert_pandas.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
21
Convert to and from Pandas DataFrames
32
=====================================
43

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

7+
.. code:: python
8+
9+
# remove comment to use latest development version
10+
import sys; sys.path.insert(0, '../')
11+
812
.. code:: python
913
1014
import raccoon as rc

docs/index.rst

Lines changed: 1 addition & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,7 @@
11
.. Raccoon documentation master file, created by
22
sphinx-quickstart on Fri Jul 29 08:26:04 2016.
3-
You can adapt this file completely to your liking, but it should at least
4-
contain the root `toctree` directive.
53
6-
Raccoon documentation
7-
=====================
8-
Overview
9-
--------
10-
Raccoon is a lightweight DataFrame and Series implementation inspired by the phenomenal Pandas package for the one use
11-
case where Pandas is known to be sub-optimal: DataFrames and Series that grow in size by rows frequently in the code.
12-
A simple speed comparison is below in the contents.
13-
14-
Source location
15-
~~~~~~~~~~~~~~~
16-
Hosted on GitHub: https://github.com/rsheftel/raccoon
17-
18-
Inspiration
19-
~~~~~~~~~~~
20-
Pandas DataFrames and Series are excellent multi-purpose data structures for data management and analysis. One of the
21-
use cases I had was to use DataFrames as a type of in-memory database table. The issue was that this required lots of
22-
growing the rows of the DataFrame, something that is known to be slow in Pandas. The reason it is slow in Pandas is
23-
that the underlying data structure is numpy which does a complete copy of the data when the size of the array grows.
24-
25-
Functionality
26-
~~~~~~~~~~~~~
27-
Raccoon implements what is needed to use the DataFrame as an in memory store of index and column data structure
28-
supporting simple and tuple indexes to mimic the hierarchical indexes of Pandas. The methods included are primarily
29-
about setting values of the data frame, growing and appending the data frame and getting values from the data frame.
30-
The raccoon DataFrame is not intended for math operations like pandas and only limited basic math methods are included.
31-
32-
Underlying Data Structure
33-
~~~~~~~~~~~~~~~~~~~~~~~~~
34-
Raccoon uses the standard built in lists. There is an option on object construction to use fast blist
35-
http://stutzbachenterprises.com/blist/ list replacement for the underlying data structure.
36-
37-
Why Raccoon?
38-
~~~~~~~~~~~~
39-
According to wikipedia some scientists believe the panda is related to the raccoon
40-
41-
Future
42-
~~~~~~
43-
This package serves the needs it was originally created for. Any future additions by myself will be driven by my own
44-
needs, but it is completely open source to I encourage anyone to add on and expand.
45-
46-
My hope is that one day Pandas solves the speed problem with growing DataFrames and this package becomes obsolete.
47-
48-
Python Version
49-
~~~~~~~~~~~~~~
50-
Raccoon requires Python 3.4 or greater. Python 2.7 support was eliminated as of version 3.0. If you need to use raccoon
51-
with Python 2.7 use any version less than 3.0
52-
53-
Helper scripts
54-
~~~~~~~~~~~~~~
55-
There is helper function to generate these docs from the source code. On windows cd into the docs directory and
56-
execute make_docs.bat from the command line. To run the test coverage report run the coverage.sh script.
4+
.. include:: ../README.rst
575

586
Updates
597
-------

docs/raccoon.rst

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,43 +4,43 @@ raccoon package
44
Submodules
55
----------
66

7-
raccoon\.dataframe module
8-
-------------------------
7+
raccoon.dataframe module
8+
------------------------
99

1010
.. automodule:: raccoon.dataframe
11-
:members:
12-
:undoc-members:
13-
:show-inheritance:
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
1414

15-
raccoon\.series module
16-
----------------------
15+
raccoon.series module
16+
---------------------
1717

1818
.. automodule:: raccoon.series
19-
:members:
20-
:undoc-members:
21-
:show-inheritance:
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
2222

23-
raccoon\.sort\_utils module
24-
---------------------------
23+
raccoon.sort\_utils module
24+
--------------------------
2525

2626
.. automodule:: raccoon.sort_utils
27-
:members:
28-
:undoc-members:
29-
:show-inheritance:
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:
3030

31-
raccoon\.utils module
32-
---------------------
31+
raccoon.utils module
32+
--------------------
3333

3434
.. automodule:: raccoon.utils
35-
:members:
36-
:undoc-members:
37-
:show-inheritance:
35+
:members:
36+
:undoc-members:
37+
:show-inheritance:
3838

3939

4040
Module contents
4141
---------------
4242

4343
.. automodule:: raccoon
44-
:members:
45-
:undoc-members:
46-
:show-inheritance:
44+
:members:
45+
:undoc-members:
46+
:show-inheritance:

0 commit comments

Comments
 (0)