Welcome to DP Learn Python’s documentation!

Quickstart

Installation

$ pip install dplearn

Or, you can download the source and

$ python setup.py install

Add sudo in the beginning if you met problem.

User Guide

Overview of dplearn

PyPI Version PyPI Platform PyPI License PyPI Doc

Why Should I Use This?

This is a Python package for data analysis which contains some very useful tools and functions.

The package is contiually updated.

Modules

  • tools
    Useful functions helping you to speed up your programming.
  • math
    Functions that realated to math calculation.
  • extra
    Some other functions that are very useful in specific situations.

Usage

Use As A Python Module
from dplearn.tools import clean
data = clean(data)
print(data)

Documentation

Check out the latest dplearn documentation at Read the Docs

Contributing

Please send pull requests, very much appriciated.

  1. Fork the repository on GitHub.
  2. Make a branch off of master and commit your changes to it.
  3. Create a Pull Request with your contribution

Tutorial

Tutorial on module dplearn.quant

wrapKLine

This is a function of wrapping K-Line dataframe into longer-duration one.

import dplearn.data_sample as ds
from dplearn.quant import wrapKLine

data = ds.kLine()
open_c = "open"
close_c = "close"
high_c = "high"
low_c = "low"
vol_c = "vol"
ts_c = "time"
ts_format = "%Y-%m-%d %H:%M:%S"
wrap = "1h"

df_new = wrapKLine(data, open_c, close_c, high_c, low_c, vol_c, ts_c, ts_format, wrap)

print(df_new.head())

Tutorial on module dplearn.tools

continue_check
from dplearn.tools import continue_check
check_value = continue_check("Do you want to continue this procedure? [Y/n]: ")

if check_value in ['n', 'N']:
   break
else:
   pass

Downloads