Home >Backend Development >Python Tutorial >Do you still need Excel if you have Python?

Do you still need Excel if you have Python?

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼forward
2019-08-16 17:36:282462browse

Do you still need Excel if you have Python?

Many developers say that since the introduction of Python/Pandas, Excel has not been used much. It is very fast to use it to process and visualize tables. However, this still has a major flaw. The operation is not a visual form, so it requires higher skills. Recently, developers built an open source project called Grid studio, which is a web-based spreadsheet application that completely combines the advantages of Python and Excel.

Do you still need Excel if you have Python?

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 the 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 both load and process data through Python and manipulate data through Excel.

Do you still need Excel if you have Python?

Processing data on Python is easier to understand. Processing data on a table is actually very similar to Excel. As shown below, write a summation formula.

Do you still need Excel if you have Python?

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

Do you still need Excel if you have Python?

Related recommendations: "Python Video Tutorial"

Why create this tool?

The author said 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 work between multiple tools such as R studio and Excel. Swap around.

When exporting a CSV file for gazillionth-time, the application window freezes if the number of rows is too high. Even doing something as simple as reading a JSON file can drive someone crazy. Existing tools do not provide the environment and associated workflows required to work efficiently, 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.

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

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

Do you still need Excel if you have Python?

Core integration: reading and writing

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

You can use the following method to write data in the table:

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

Use the following method Read data from the table:

my_matrix = sheet("A1:A3")

You can read or write data directly in the table in this simple and efficient way, To automate data entry, extraction, visualization and other processes.

Writing customized table functions

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

In addition to the default functions such as AVERAGE, SUM, and IF, you may also need other functions, so just write them down!

def UPPERCASE(a):

return str(a).uppercase()

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

Using the Python ecosystem

By leveraging various powerful software packages in the Python ecosystem, we can immediately access the best data science tools at the moment, so we can quickly Access powerful models such as linear regression, support vector machines, and more.

Do you still need Excel if you have Python?

Because Grid studio itself mainly processes 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 as to obtain "prior knowledge" about the data. By integrating the interactive plotting library Plotly.js and the Python standard visualization library Matplotlib, Grid studio now has built-in advanced plotting functions. We can use advanced drawing features on vector table formats as shown below:

Do you still need Excel if you have Python?

To further explain how to use the features of Grid studio to build visual icons, the project author also shows two There are two cases, that is, crawling web pages and visualizing data distribution, but here we mainly show the first case.

Case: Estimating the Normal Distribution

The following case demonstrates the power of Grid studio. It will visualize the normal distribution through Plotly.js with higher fidelity. We can take a look. How exactly is interactive mapping done.

Do you still need Excel if you have Python?

Use and install

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

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

cd gridstudio && ./run.sh

As above, download the project and run the installation script in two steps. We can open the local port in the browser and use it happily.

The above is the detailed content of Do you still need Excel if you have Python?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:jianshu.com. If there is any infringement, please contact admin@php.cn delete