Skip to main content

logo dovpanda

pypi Build Status Documentation Status Updates python3 license

Directions OVer PANDAs

Directions are hints and tips for using pandas in an analysis environment. dovpanda is an overlay companion for working with pandas in an analysis environment.
It is an overlay module that tries to understand what you are trying to do with your data, and helps you make you code more concise with readable.
If you think your task is common enough, it probably is, and pandas probably has a built-in solution. dovpanda will help you find them.

Usage

Hints

The main usage of dovpanda is its hints mechanism, which is very easy and works out-of-the-box. Just import it after you import pandas, whether inside a notebook or in a console.

import pandas as pd
import dovpanda

This is it. From now on you can expect dovpanda to come up with helpful hints while you are writing your code.

Notebook

Running dovpanda in a notebook environment will display rendered dismissable html.
random tip

Console

df = pd.DataFrame({'a':list('xxyy'),'b':[40,50,60,70], 'time':['18:02','18:45','20:12','21:50']})
df['time'] = pd.to_datetime(df.time)
df['hour'] = df.time.dt.hour
df.groupby('hour').b.sum()
===== Seems like you are grouping by a column named 'hour', consider setting the your
time column as index and then use df.resample('h') =====
Out[4]:
hour
18    90
20    60
21    70
Name: b, dtype: int64

Installation

pip install dovpanda

Extended Usage

Random Tips

dovpanda.tip() will give you a random pandas tip.
random tip

Change Display

use dovpanda.set_output if you want to change output.

In [14]: dovpanda.set_output('display')
In [15]: df.iterrows()
===== iterrows is not recommended, and in the majority of cases will have better alternatives =====
Out[15]: <generator object DataFrame.iterrows at 0x110fe4318>

In [16]: dovpanda.set_output('print')
In [17]: df.iterrows()
iterrows is not recommended, and in the majority of cases will have better alternatives
Out[17]: <generator object DataFrame.iterrows at 0x112c408b8>

In [18]: dovpanda.set_output('warning')
In [19]: df.iterrows()
WARNING:dovpanda:iterrows is not recommended, and in the majority of cases will have better alternatives
Out[19]: <generator object DataFrame.iterrows at 0x110ee7e58>

In [20]: dovpanda.set_output('off')

In [21]: df.iterrows()
Out[21]: <generator object DataFrame.iterrows at 0x1047c4d68>


BTW

"dov" means bear in Hebrew logo

Documentation

The full documentation is at http://dovpanda.rtfd.org.

History

0.0.5 (2019-11-11) ++++++++++++++++++

  • dovpanda errors don't crash panda

  • Errors in functionality of dovpanda will only tell the user it happened but let them continue the work

  • fix read_csv issue #76

  • fix at/iat issues when calling shape on str #77

0.0.4 (2019-11-09) ++++++++++++++++++

  • fix to import error issue #71

0.0.3 (2019-11-08) ++++++++++++++++++

  • First published release

0.0.2 (2019-10-30) ++++++++++++++++++

  • First release on PyPI.

Metadata

Release files for dovpanda 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dovpanda 0.0.5
File Size Uploaded
dovpanda-0.0.5.tar.gz 27.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dovpanda 0.0.5
File Interpreter ABI Platform
dovpanda-0.0.5-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 48.9 kB

Release files / dovpanda-0.0.5.tar.gz

Download URL dovpanda-0.0.5.tar.gz
Size 27.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7afa5caf317695d27813f05a77d20c4dabdfd49a292f87332414af35c2b65bb8
BLAKE2b-256 checksum
How to use checksums
5d7ecd20434b9f6d75ba5c43cc4b4e5ac57471bfa1ab4767c97842367b7f4090
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.1 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.6.7

Release files / dovpanda-0.0.5-py2.py3-none-any.whl

Download URL dovpanda-0.0.5-py2.py3-none-any.whl
Size 21.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
cb86a4463d7dd531b7dd0493ca9a9fdffefae2130036149e20a3ac9743bc96b3
BLAKE2b-256 checksum
How to use checksums
472062889eb30cb9cf0b2cdfebabf1b5c97bcaddfdeea706f9318d2f07a59a0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.1 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.6.7
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page