pandas2.0引入了pyarrow作为可选后端,比numpy的性能提高很多,所以为了改造backtrader,用cython和c++重写整个框架,准备用arrow作为底层的数据结构(backtrader现在的底层数据结构是基于python array构建的)
安装arrow推荐使用vcpkg文章来源:https://www.toymoban.com/news/detail-703605.html
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install arrow
CMakeLists.txt文章来源地址https://www.toymoban.com/news/detail-703605.html
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
#
到了这里,关于arrow的使用的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!