D-Tale: An incredibly powerful exploratory data analysis tool

Hello everyone, today I will share with you a very powerful data set exploratory analysis plug-in D-Tale.

Through it, we can quickly analyze and understand the basic situation of the data, further analyze and visualize the data, and like to remember to bookmark, like, and follow.

Note: Complete data are obtained at the end of the text.

Install the module

pip install dtale

D-TaleOpen dataset with plugin

We D-Taleopen the dataset in , the code is as follows

import dtale
import pandas as pd

df = pd.read_csv(r'gapminder_full.csv')
d = dtale.show(df)
d

output

picture

The data set comes from Kaggle, which contains data such as the total population, per capita GDP and life expectancy of each country in the world. Let's try to use the various functions of the plugin.

filter data

Let's take a look at how to use D-Taleplug-ins to filter data. For example, we want to filter out the content whose year is 2002. The steps are as follows

picture

We click Actionon one of them Custom Filter, then fill in the corresponding one year==2002, and then click Applyto achieve it. Of course, we can also click on a corresponding column, and then drag the mouse to the bottom, and the same operation can be performed. The steps are as follows

picture

Other basic data operations

We can also sort the data. When we click on a column, the following option box will pop up,

picture

It includes buttons to sort the data. For example, we gdp_capsort this column in descending order. The steps are as follows

picture

We can also rename each column in the dataset, using Renamethis option button, the steps are as follows

picture

Then if you want to delete a column, the corresponding Deleteoption button is this, which is equivalent to Pandasthe dropmethod in it

When we click Describethis button, a statistical analysis for a column will appear, as shown in the following figure

picture

And the final results of statistical analysis can be more intuitively displayed in the form of chart visualization

picture

If we want to view the correlation between each feature variable, the D-Taleplugin will present it in the form of a heatmap, the steps are as follows

picture

Chart visualization capabilities

The plugin can also draw charts, we click the Visualizebutton in the picture and select Chartsthis button in the drop-down box

picture

Next, we enter the visualization interface, as shown in the following figure

picture

This includes the drawing of various charts such as line charts, scatter charts, histograms, word cloud charts, heat maps, etc. We only need to specify the variables placed on the X axis, the variables placed on the Y axis, and the corresponding statistics. That's it, interested readers can try it when they are free

picture

If there are missing values ​​in the data set, it can also be displayed in the form of a chart, because the previously referenced data set has no missing values, because it is changed to another data set to operate, the steps are shown in the following figure

picture

Setting Options

Let's take a look at the settingbuttons in the toolbar. In the drop-down box that appears after clicking, we can set whether the interface is "dark mode", and can also set the language.

picture

The width and height of the interface can be adjusted if we feel that it is not possible

picture

Group Statistics

We click the button in the toolbar above the chart Actions, click the button in the drop-down box Summarize Data, and the following interface appears

picture

We click GroupBythe button, for example, we will continentconduct statistics on the life expectancy of each continent for the column, the steps are as follows

picture

Finally, we can export the code for the above operation, the steps are as follows

picture

recommended article

Technology Exchange

Welcome to reprint, collect, like and support!

insert image description here

At present, a technical exchange group has been opened, and the group has more than 2,000 members . The best way to remark when adding is: source + interest direction, which is convenient to find like-minded friends

  • Method 1. Send the following picture to WeChat, long press to identify, and reply in the background: add group;
  • Method ②, add micro-signal: dkl88191 , note: from CSDN
  • Method ③, WeChat search public account: Python learning and data mining , background reply: add group

long press follow

Guess you like

Origin blog.csdn.net/qq_34160248/article/details/124250264