Giter Site home page Giter Site logo

featureanalyzer's Introduction

FeatureAnalyzer

手动安装qtpandas 最新版本

  • qtpandas主页Code处下载zip文件,手动编译安装1.0.4版本
  • 解压缩,启动终端,切换到解压后的文件夹,注意如果使用python的虚拟环境要灵活切换
  • 输入代码,先编译再安装
python setup.py build
python setup.py install

修改代码太长不看版

  1. 安装openpyxl
    • pip install openpyxl
  2. 针对qtpandas\views\EditDialogs.py文件,修改以下代码
    • Line 16 import pandas
    • Line 17 from pandas.tslib import NaTType -> from pandas._libs.lib import *
    • Line 177 if isinstance(defaultValue, NaTType): -> if isinstance(defaultValue, type(pandas.NaT)):
  3. 针对qtpandas\views\DataTableView.py,修改以下代码
    • Line 66 result = drag.start(Qt.MoveAction) -> result = drag.exec_(Qt.MoveAction)
  4. 针对qtpandas\models\DataFrameModel.py文件,修改以下代码
    • Line 366,368,376,380,394,408 .ix[row_index, column_index] -> .loc[row_index, column_index]

修改代码

由于qtpandas 使用的pandas版本太低,部分api 已经进行了调整,需要我们手动修改代码才能正确运行,参考博文具体而言包括:

  1. ModuleNotFoundError: No module named 'pandas.tslib'
  • 出错位置 qtpandas\views\EditDialogs.py
  • 语句 from pandas.tslib import NaTType
  • 修改成 from pandas._libs.lib import *
  • line 17 in File EditDialogs.py
  1. ImportError: Missing optional dependency 'openpyxl'. Use pip or conda to install openpyxl.
  • 出错位置 pandas\compat_optional.py", line 141, in import_optional_dependency raise ImportError(msg)
  • 修改 安装openpyxl
  1. AttributeError: 'DataFrame' object has no attribute 'ix'
  • 出错位置 qtpandas\models\DataFrameModel.py", line 396, in data result = convertValue(row, col, columnDtype)
  • 修改 DataFrameModel.py 凡在对DataFrame的操作中使用了“.ix[row_index, column_index]”或类似操作的,多处,将.ix 改成.loc
  • line 366,368,376,380,394,408 in File DataFrameModel.py
  1. 此时双击表格会出现 AttributeError: 'QDrag' object has no attribute 'start'
  • 出错位置 qtpandas\views\DataTableView.py", line 70, in mouseMoveEvent self.startDrag(self.indexAt(event.pos()))
  • 'start' was renamed to 'exec_' in Qt 4.3.
  • 修改 start为exec_
  • line 66 in File DataTableView.py
  1. 双击编辑表格出出现 AttributeError: 'DataFrame' object has no attribute 'set_value'
  • 出错位置qtpandas\models\DataFrameModel.py", line 497, in setData self._dataFrame.set_value(row, col, value)
  • 修改 self._dataFrame.set_value(row, col, value) 为 self._dataFrame.at[row, col] = value
  • line 397 in File DataFrameModel.py
  1. name 'NaTType' is not defined
  • 出错位置 qtpandas\views
  • 修改 if isinstance(defaultValue, NaTType): 为 if isinstance(defaultValue, type(pandas.NaT)): 同时在顶部导入包 import pandas
  • line 177 in File EditDialogs.py

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.