arrow的使用

pandas2.0引入了pyarrow作为可选后端,比numpy的性能提高很多,所以为了改造backtrader,用cython和c++重写整个框架,准备用arrow作为底层的数据结构(backtrader现在的底层数据结构是基于python array构建的)

安装arrow推荐使用vcpkg

git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install arrow

CMakeLists.txt

cmake_minimum_required(VERSION 3.16)

project(ArrowTutorialExamples)

find_package(Arrow REQUIRED)
find_package(ArrowDataset)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_BUILD_TYPE Release)

message(STATUS "Arrow version: ${ARROW_VERSION}")
message(STATUS "Arrow SO version: ${ARROW_FULL_SO_VERSION}")

# add_executable(arrow_example arrow_example.cc)
# target_link_libraries(arrow_example PRIVATE Arrow::arrow_shared)

# add_executable(file_access_example file_access_example.cc)
# target_link_libraries(file_access_example PRIVATE Arrow::arrow_shared
#                            

你可能感兴趣的:(数据库使用指南,python,pandas,backtrader,arrow,pyarrow)