Skip to main content

Collection of python helpers to prettier print

Project description

Rodin Helpers

Библиотека с набором функций для наглядного вывода данных в Jupyter Notebook

Установка

pip install -U git+https://github.com/madiedinro/rodin_helpers_py
import rodin_helpers as rh

В jupyer перед командой добавляется префикс !

Вывод ссылки в заданном формате

rh.show_link('https://digitalgod.be')

Результат:

Click Authorize or open https://digitalgod.be in your browser

Вывод YouTube видео по id

rh.video('2-gboBo3MtY')

Отображение структурированных данных с указанием типов

data = [
    {
        'date': '2019-01-11',
        'metrics': {
            'visits':1534,
            'impressions':2345
        }
    },
    {
        'date': '2019-01-12',
        'metrics': {
            'visits':1324,
            'impressions':2132
        }
    }
]
rh.walk(data)

Результат:

[list
[dict  0
|      0 > date=2019-01-11
[dict  0 > metrics
|      0 > metrics > visits=1534
|      0 > metrics > impressions=2345
[dict  1
|      1 > date=2019-01-12
[dict  1 > metrics
|      1 > metrics > visits=1324
|      1 > metrics > impressions=2132

Представление построчных данных (к примеру, из бд)

rh.print_rows(data)

Результат:

campaign_id date utm_term utm_source account_id spent utm_campaign clicks utm_content impressions ad_id reach
1010819423 2019-01-20 retarg-mob vk 1603421955 None dr4 None kiborg-vid 12 49726084 8
1010819423 2019-01-21 retarg-mob vk 1603421955 None dr4 None kiborg-vid 15 49726084 13
1010819423 2019-01-22 retarg-mob vk 1603421955 13.00 dr4 None kiborg-vid 7 49726084 7
1010819423 2019-01-23 retarg-mob vk 1603421955 None dr4 None kiborg-vid 9 49726084 8
1010819423 2019-01-24 retarg-mob vk 1603421955 None dr4 None kiborg-vid 5 49726084 5
1010819423 2019-01-25 retarg-mob vk 1603421955 4.60 dr4 None kiborg-vid 4 49726084 3
1010819423 2019-01-26 retarg-mob vk 1603421955 None dr4 None kiborg-vid 4 49726084 3
1010819423 2019-01-27 retarg-mob vk 1603421955 None dr4 None kiborg-vid 6 49726084 5
1010819423 2019-01-28 retarg-mob vk 1603421955 None dr4 None kiborg-vid 3 49726084 3
1010819423 2019-01-29 retarg-mob vk 1603421955 None dr4 None kiborg-vid 5 49726084 5
1010819423 2019-01-30 retarg-mob vk 1603421955 None dr4 None kiborg-vid 2 49726084 2
campaign_id|date|utm_term|utm_source|account_id|spent|utm_campaign|clicks|utm_content|impressions|ad_id|reach
---|---|---|---|---|---|---|---|---|---|---|---
1010819423|2019-01-20|retarg-mob|vk|1603421955|None|dr4|None|kiborg-vid|12|49726084|8
1010819423|2019-01-21|retarg-mob|vk|1603421955|None|dr4|None|kiborg-vid|15|49726084|13
1010819423|2019-01-22|retarg-mob|vk|1603421955|13.00|dr4|None|kiborg-vid|7|49726084|7
1010819423|2019-01-23|retarg-mob|vk|1603421955|None|dr4|None|kiborg-vid|9|49726084|8
1010819423|2019-01-24|retarg-mob|vk|1603421955|None|dr4|None|kiborg-vid|5|49726084|5
1010819423|2019-01-25|retarg-mob|vk|1603421955|4.60|dr4|None|kiborg-vid|4|49726084|3
1010819423|2019-01-26|retarg-mob|vk|1603421955|None|dr4|None|kiborg-vid|4|49726084|3
1010819423|2019-01-27|retarg-mob|vk|1603421955|None|dr4|None|kiborg-vid|6|49726084|5
1010819423|2019-01-28|retarg-mob|vk|1603421955|None|dr4|None|kiborg-vid|3|49726084|3
1010819423|2019-01-29|retarg-mob|vk|1603421955|None|dr4|None|kiborg-vid|5|49726084|5
1010819423|2019-01-30|retarg-mob|vk|1603421955|None|dr4|None|kiborg-vid|2|49726084|2

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rodin_helpers-0.1.2.tar.gz (3.7 kB view details)

Uploaded Source

File details

Details for the file rodin_helpers-0.1.2.tar.gz.

File metadata

  • Download URL: rodin_helpers-0.1.2.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for rodin_helpers-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4ebbb385e2414ca5857deb413caccee8a06ea98db138336f8fb50171644ac26b
MD5 b9efce193256189fe570f7d0a3fd7461
BLAKE2b-256 ec9f6dfea88b6419719c3af6b2038338545be8b31c03b8717f7de49912aa5aa7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page