Say goodbye to Excel, the god-level editor unifies tables and Python

(Star Python developers to improve Python skills)

Transfer from: Heart of the Machine

640?wx_fmt=png


Yes, displaying visual tables and codes on one interface at the same time, and modifying data through tables and codes at the same time, isn't this a combination of Python and Excel?


Project address: https://github.com/ricklamers/gridstudio


Let's first take a look at the effect of Grid studio. In general, we can load and process data through Python, and manipulate data through "Excel".

640?wx_fmt=gif


Processing data on Python is easier to understand. Processing data on a table is actually very similar to Excel. The following is to write a summation formula.

640?wx_fmt=gif


Maybe we changed some data on the table, then we can also import it into the NumPy array and do further operations.

640?wx_fmt=gif


Why was this tool created?


The author stated that he created Grid studio mainly to solve the problem of scattered workflow in data science projects. In this kind of project, he has to switch between R studio, Excel and other tools.


When exporting CSV files for gazillionth-time, if the number of lines is too high, the application window will freeze. Even doing simple things, such as reading JSON files, can drive people crazy. Existing tools cannot provide the environment and related workflow required for efficient work, which is why the author decided to build this tool. He wanted to create an easy-to-use application that could integrate data science workflows.


What are the highlights of this tool?


Grid studio is a web-based application that looks similar to Google Sheets and Microsoft Excel. However, its killer feature is the integration of the Python language.


Almost everyone who has used a computer will naturally use tables to view and edit data. Combining this simple UI with a mature programming language like Python is not too easy to use.


Writing a script in Python is very simple: just write a few lines of code and run it directly.

640?wx_fmt=gif


Core integration: read, write


The core of this Python integration is the read and write interface to the spreadsheet, which can establish a high-performance connection between the data in the spreadsheet and the data in the Python process.


You can write data in the table in the following ways:

 
  

sheet("A1:A3", [1, 2, 3])


Read data from the table in the following way:

 
  

my_matrix = sheet("A1:A3")


You can read or write data directly in the table in this simple and efficient way to automate the process of data input, extraction, and visualization.


Write customized table functions


Although reading and writing through a simple interface is very flexible, sometimes it is also important to write custom functions that can be called directly.


In addition to the default functions of AVERAGE, SUM, IF, you may also need other functions, so just write them out!

 
  

def UPPERCASE(a):
    return str(a).uppercase()


After writing this line of code, call the function in the table, just like calling a regular function.


Use Python ecology


By using various powerful software packages in the Python ecosystem, we can immediately access the current best data science tools, so we can also quickly access powerful models such as linear regression and support vector machines.

640?wx_fmt=png


Because Grid studio itself mainly deals with tabular data, using them as features can quickly call models such as SVM to explore the features hidden behind these data.


data visualization


In data science, a very common task is to visualize data so that "prior knowledge" about the data can be obtained. By integrating the interactive plotting library Plotly.js and the Python standard visualization library Matplotlib, Grid studio currently has built-in advanced plotting functions. As shown below, we can use advanced drawing functions on the vector table format:

640?wx_fmt=gif


In order to further explain how to use the features of Grid studio to build visual icons, the project author also showed two cases, namely crawling web pages and visualizing data distribution, but here is mainly the first case.


Case: Estimate the normal distribution


The following case shows the powerful functions of Grid studio. It will visualize the normal distribution through Plotly.js with higher fidelity. We can see how interactive mapping is done.

640?wx_fmt=gif


Use install


So many features have been introduced before, so how do we use them? The installation and use of Grid studio are very simple and can be done with a simple command line.


  • git clone https://github.com/ricklamers/gridstudio

  • cd gridstudio && ./run.sh


By downloading the project and running the installation script as above, we can open the local port in the browser, and then we can use it happily.

Reference link:

https://hackernoon.com/introducing-grid-studio-a-spreadsheet-app-with-python-to-make-data-science-easier-tdup38f7
https://github.com/ricklamers/gridstudio

https://gridstudio.io



Recommended reading

(Click the title to jump to read)

A new set of Python tutorials on Microsoft's official website

Use Python to analyze 1.4 billion pieces of data

3 top Python libraries for data science


Think this article is helpful to you? Please share with more people

Pay attention to the "Python Developer" starred to improve Python skills

640?wx_fmt=png

Good article, I am reading ❤️

Guess you like

Origin blog.csdn.net/iodjSVf8U1J7KYc/article/details/100012312