The pandastable library provides a table widget for Tkinter with plotting and data manipulation functionality. It uses the pandas DataFrame class to store table data. Pandas is an open source Python library providing high-performance data structures and data analysis tools. Tkinter is the standard GUI toolkit for python. It is intended for the following uses:
The DataExplore application using these classes is included in the distribution and is a self-contained application for educational and research use. Currently this focuses on providing a spreadsheet like interface for table manipulation withconfigurable 2D/3D plotting. A windows standalone installer is available that does not require Python installation.
Requires python>=3.3 or 2.7 and numpy, matplotlib and pandas. These requirements should be satisfied automatically when using: (You may need to use pip3 or easy_install3 to specify python version 3).
pip install pandastable
or
easy_install pandastable
see the wiki page for more details on installing.
What version of Python?
Python versions >=2.7 and >=3.3 are compatible. However python 3.4 is recommended if possible. For a similar table widget that works without pandas dataframes and has minimal dependencies see the previous incarnation, tkintertable.
Why use Tkinter?
Tkinter is still the standard GUI toolkit for python though it is sometimes disliked for its outdated appearance (especially on linux) and somewhat limited widget set. However largely because this library is based on an older one called tkintertable for drawing the table, I have stuck with tkinter rather than start from scratch using another toolkit.
Is this just a half-baked spreadsheet?
Hopefully not. Some of the basic functions are naturally present since it's a table. But there is no point in trying to mimic a proper spreadsheet app. pandas can do lots of stuff that would be nice for a non-programmer to utilize and that might not be available in a spreadsheet application.
Are there other better tools for dataframe visualization?
This depends as always on what is required. The ipython notebook is good for interactive use. bokeh is an advanced interactive plotting tool using modern generation web technologies for in browser rendering. This can handle dataframes. The goal of this project is to use DataFrames as the back end for a table widget that can be used in a desktop appplication.
Installing the package creates a command dataexplore in your path. Just run this to open the program. This is a standalone application for data manipulation and plotting meant for education and basic data analysis. See the home page for this application at http://dmnfarrell.github.io/pandastable/
The basics for now. More details to be added here.
Create a parent frame and then add the table to it:
from tkinter import *
from pandastable import Table
#assuming parent is the frame in which you want to place the table
pt = Table(parent)
pt.show()
Update the table:
#alter the DataFrame in some way, then update
pt.redraw()
Import a csv file:
pt.importCSV('test.csv')
http://openresearchsoftware.metajnl.com/articles/10.5334/jors.94/
http://dmnfarrell.github.io/pandastable/
http://jakevdp.github.io/blog/2013/03/23/matplotlib-and-the-future-of-visualization-in-python/
If you use this software in your work please cite the following article:
Farrell, D 2016 DataExplore: An Application for General Data Analysis in Research and Education. Journal of Open Research Software, 4: e9, DOI: http://dx.doi.org/10.5334/jors.94
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。