Orca: distributed panda interface based on dolphin DB

Dolphin DB technology 2021-02-23 10:38:18
orca distributed panda interface based

Orca The project in DolphinDB On top of that comes pandas API, It enables users to analyze and process massive data more efficiently .

If you are already familiar with pandas, You can go through Orca package , make the best of DolphinDB High performance and concurrency , Dealing with massive data , Without the extra learning curve . If you already have one pandas Code , You don't have to worry about what you already have pandas A lot of code changes , Can move to Orca.

at present ,Orca The project is still in the development phase , And in fast iterations . We welcome you to use Orca At the same time , adopt GitHub issues Give us feedback .

Orca Design concept of

Python Third party library pandas It's a powerful tool for analyzing structured data , High performance 、 The interface is easy to use 、 Easy to learn features , Popular in data science and Quantitative Finance . However , When we start to deal with TB Level of massive data , Single core operation pandas It seems to be out of hand ;pandas The high memory consumption is also one of the limitations that affect its performance . When we have more processor cores , When you have multiple physical machines , We'll want to take advantage of concurrency , Improve the efficiency of data processing .

DolphinDB It's a distributed data analysis engine , It can be TB Class massive data is stored on multiple physical machines , And make the most of CPU, High performance analysis and calculation of massive data . In the calculation of the same function ,DolphinDB In terms of performance pandas fast 1~2 An order of magnitude , also Memory footprint is usually less than pandas Of 1/2. but DolphinDB The way of deployment and development is similar to pandas There's a significant difference , If the user wants to pandas Migrate to DolphinDB, A lot of changes need to be made to the existing code . Fortunately, ,DolphinDB We have started to develop Orca project —— One is based on DolphinDB Engine pandas DataFrame API The implementation of the . It allows users to pandas Programming style , Simultaneous utilization DolphinDB Performance advantages , Efficient analysis of massive data . comparison panddas Full memory computing ,Orca Support distributed storage and Computing . For the same amount of data , Memory footprint is generally less than pandas Of 1/2.

Orca The architecture of

Orca The top floor is pandas API, The bottom is DolphinDB database , adopt DolphinDB Python API Realization Orca The client and DolphinDB Communication on the server side .Orca The basic working principle of is , On the client side through Python Generate DolphinDB Script , Pass the script through DolphinDB Python API Send to DolphinDB Server side parsing execution .Orca Of DataFrame Only the corresponding DolphinDB The metadata of the table of , Real storage and computing are on the server side .

therefore ,Orca There are some restrictions on the interface of :

  • Orca Of DataFrame Each column in cannot be a mixed type , Listing must also be legal DolphinDB Variable name .
  • If DataFrame Corresponding DolphinDB Table is a partitioned table , Data storage is not continuous , So there is no RangeIndex The concept of , And you can't put a whole Series Assign to a DataFrame The column of .
  • about DolphinDB Partition table , Some functions that are not implemented in a distributed version , for example median,Orca Temporary does not support .
  • DolphinDB Null value mechanism and pandas Different ,pandas use float Type of nan As a null value , and DolphinDB The null value of is the minimum value of each type .
  • DolphinDB It's a columnar database . about pandas Interface , some axis=columns Parameters are not supported yet .
  • Cannot be resolved at present Python function , therefore , for example DataFrame.apply, DataFrame.agg Etc. cannot accept a Python Function as parameter .

About Orca and pandas Detailed differences , And the resulting Orca Programming considerations , Please refer to Orca Use the tutorial .


Orca Support Linux and Windows System , requirement Python Version is 3.6 And above ,pandas Version is 0.25.1 And above .

Orca Project has been integrated into DolphinDB Python API in . adopt pip Tool installation DolphinDB Python API, You can use Orca.

pip install dolphindb

Orca Is based on DolphinDB Python API Developed , therefore , You need to have a DolphinDB The server , And pass connect Function to connect to this server , And then run Orca:

>>> import dolphindb.orca as orca

If you already have one pandas Program , Can be pandas Of import Replace with :

# import pandas as pd
import dolphindb.orca as pd

For more information

Using tutorials and notes

Orca And pandas API Detailed differences

Orca visit DolphinDB Distributed database tutorial

Orca Save data tutorial

use Orca Develop quantitative strategies

DolphinDB Python API

本文为[Dolphin DB technology]所创,转载请带上原文链接,感谢

  1. 阿里、华为Python工程师总结的实用技巧,只有你还没看?
  2. 酸了!看到抖音上Python程序员晒得工资条......
  3. Python基础之:数字字符串和列表
  4. Importing excel into database adaptively by Python
  5. Python安装教程
  6. Python安装教程
  7. From Xiaobai to master, here is a guide to pandas
  8. [Python] drawing method of stem leaf diagram and compound pie diagram
  9. Drawing of Python geoplot spatial kernel density estimation map
  10. Python Seaborn economist's classic chart imitation
  11. Python space drawing - regionmask mask operation example
  12. Python space drawing - cartopy longitude and latitude add
  13. Python pykrige package Kriging interpolation calculation and visual rendering
  14. Python batch resampling, mask, slope extraction
  15. Python - Analysis of reachable circle of multiple traffic modes
  16. Python space drawing bubble drawing
  17. Python 3 multithreading and Mongo 100 million consumption log data fresh demo
  18. ARIMA model for predicting time series of CO2 concentration
  19. python isinstance()
  20. How to modify tens of thousands of file names with one key in Python
  21. Python notes: List
  22. Translation: practical Python Programming 02_ 03_ Formatting
  23. Python中的四种队列(queue)、堆(heap)
  24. Side effects of Python mutable types as default parameters of functions
  25. This is the best Python tutorial I've ever seen: ten minutes to get to know python
  26. 使用python编写量子线路打印的简单项目,并使用Sphinx自动化生成API文档
  27. Python happy enemy: crawler and anti crawler with a solution to give you New Year
  28. 使用python编写量子线路打印的简单项目,并使用Sphinx自动化生成API文档
  29. When writing python, you will encounter the following error: modulenotfounderror: no module named ' email.mime '; 'email' is not a package
  30. Python class call and private and public property method call
  31. Proprietary methods for Python classes
  32. Foundation of Python: number string and list
  33. Foundation of Python: number string and list
  34. Foundation of Python: number string and list
  35. 华为 Python网络自动化
  36. Python Cannot open E:\Python36\Scripts\pip-script.py
  37. Peeping into the future is not a dream, python data analysis is easy to achieve
  38. The practical skills summed up by Alibaba and Huawei Python engineers, only you haven't seen them yet?
  39. Sour! See the Python programmers on the tiktok get the pay slip...
  40. Foundation of Python: number string and list
  41. Python installation tutorial
  42. Python installation tutorial
  43. This article will familiarize you with the transformation process of Python - > Cafe - > om model
  44. Four kinds of queues and heaps in Python
  45. Using Python to write a simple project of quantum circuit printing, and using Sphinx to automatically generate API documents
  46. Using Python to write a simple project of quantum circuit printing, and using Sphinx to automatically generate API documents
  47. Huawei Python Network Automation
  48. Python Cannot open E:\Python36\Scripts\pip- script.py
  49. 找不到Python问题解决
  50. PHP和Python哪个更有市场前景?我学的是PHP
  51. Python problem resolution not found
  52. Which has more market prospects, PHP or Python? I studied PHP
  53. Foundation of Python: number string and list
  54. python 编码问题之终极解决
  55. The ultimate solution to the problem of Python coding
  56. 能取值亦能赋值的Python切片
  57. Python slice with value and value
  58. 能取值亦能赋值的Python切片
  59. Python slice with value and value
  60. python 异常处理