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¶
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.
Documentation¶
Check out the latest dplearn
documentation at Read the Docs
Contributing¶
Please send pull requests, very much appriciated.
- Fork the repository on GitHub.
- Make a branch off of master and commit your changes to it.
- 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())