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-Tale
Open dataset with plugin
We D-Tale
open 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
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-Tale
plug-ins to filter data. For example, we want to filter out the content whose year is 2002. The steps are as follows
We click Action
on one of them Custom Filter
, then fill in the corresponding one year==2002
, and then click Apply
to 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
Other basic data operations
We can also sort the data. When we click on a column, the following option box will pop up,
It includes buttons to sort the data. For example, we gdp_cap
sort this column in descending order. The steps are as follows
We can also rename each column in the dataset, using Rename
this option button, the steps are as follows
Then if you want to delete a column, the corresponding Delete
option button is this, which is equivalent to Pandas
the drop
method in it
When we click Describe
this button, a statistical analysis for a column will appear, as shown in the following figure
And the final results of statistical analysis can be more intuitively displayed in the form of chart visualization
If we want to view the correlation between each feature variable, the D-Tale
plugin will present it in the form of a heatmap, the steps are as follows
Chart visualization capabilities
The plugin can also draw charts, we click the Visualize
button in the picture and select Charts
this button in the drop-down box
Next, we enter the visualization interface, as shown in the following figure
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
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
Setting Options
Let's take a look at the setting
buttons 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.
The width and height of the interface can be adjusted if we feel that it is not possible
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
We click GroupBy
the button, for example, we will continent
conduct statistics on the life expectancy of each continent for the column, the steps are as follows
Finally, we can export the code for the above operation, the steps are as follows
recommended article
-
Li Hongyi's "Machine Learning" Mandarin Course (2022) is here
-
Someone made a Chinese version of Mr. Wu Enda's machine learning and deep learning
-
I'm addicted, and recently I gave the company a big visual screen (with source code)
-
So elegant, 4 Python automatic data analysis artifacts are really fragrant
-
It's very fragrant, and 20 visual large-screen templates have been organized
Technology Exchange
Welcome to reprint, collect, like and support!
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