Skip to content

Commit ccf3038

Browse files
committed
pandas-profiling app added
1 parent 55e3cb2 commit ccf3038

4 files changed

Lines changed: 498 additions & 0 deletions

File tree

css/common/profiling.css

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
.vp-pf {
2+
position: absolute;
3+
top: 0;
4+
left: 0;
5+
width: 100%;
6+
height: 100%;
7+
8+
z-index: 1200;
9+
10+
background-color: rgba(0,0,0,.4);
11+
}
12+
13+
.vp-pf-container {
14+
position: relative;
15+
left: 50%;
16+
top: 50%;
17+
transform:translate(-50%, -50%);
18+
19+
min-width: 400px;
20+
min-height: 400px;
21+
width: 50%;
22+
height: 95%;
23+
24+
background-color: white;
25+
}
26+
27+
.vp-pf-title {
28+
height: 30px;
29+
padding: 5px 0px 5px 10px;
30+
31+
background-color: #EEE;
32+
border: 1px solid #ddd;;
33+
display: flex;
34+
flex-direction: row;
35+
position: relative;
36+
37+
font-weight: 700;
38+
}
39+
40+
.vp-pf-close,
41+
.vp-pf-popup-close {
42+
position: fixed;
43+
z-index: 3;
44+
right: 5px;
45+
width: 20px;
46+
height: 20px;
47+
line-height: 20px;
48+
top: 5px;
49+
text-align: center;
50+
cursor: pointer;
51+
}
52+
53+
.vp-pf-body {
54+
width: 100%;
55+
height: calc(100% - 30px);
56+
padding: 10px;
57+
}
58+
59+
.vp-pf-grid-box {
60+
display: grid;
61+
width: 100%;
62+
height: 100%;
63+
grid-row-gap: 5px;
64+
/* grid-template-rows: 60px calc(100% - 80px); */
65+
/* grid-template-rows: 80px calc(100% - 100px); */
66+
grid-template-rows: 80px min-content;
67+
}
68+
69+
.vp-pf-prepare-box {
70+
display: grid;
71+
/* grid-column-gap: 10px; */
72+
grid-row-gap: 5px;
73+
/* grid-template-columns: 150px calc(100% - 150px); */
74+
/* grid-template-rows: repeat(2, 50%); */
75+
grid-template-rows: 20px 35px;
76+
border: 1px solid #E4E4E4;
77+
box-sizing: border-box;
78+
box-shadow: 0px 2px 4px rgb(0 0 0 / 25%);
79+
padding: 10px;
80+
}
81+
.vp-pf-link {
82+
color: var(--hightlight-color);
83+
}
84+
85+
.vp-pf-show-box {
86+
display: grid;
87+
grid-template-rows: min-content min-content;
88+
grid-row-gap: 10px;
89+
border: 1px solid #E4E4E4;
90+
box-sizing: border-box;
91+
box-shadow: 0px 2px 4px rgb(0 0 0 / 25%);
92+
padding: 10px;
93+
}
94+
95+
.vp-pf-df-box {
96+
display: grid;
97+
grid-template-columns: 100px auto;
98+
grid-row-gap: 5px;
99+
}
100+
.vp-pf #vp_pfVariable {
101+
width: 125px;
102+
}
103+
.vp-pf-df-refresh {
104+
cursor: pointer;
105+
}
106+
.vp-pf-input {
107+
width: max-content;
108+
}
109+
110+
.vp-pf-menu-item {
111+
width: 120px !important;
112+
}
113+
114+
/** buttons */
115+
.vp-pf-btn-box {
116+
position: absolute;
117+
bottom: 10px;
118+
right: 10px;
119+
}
120+
.vp-pf-btn-apply
121+
, .vp-pf-popup-ok {
122+
width: 80px;
123+
height: 30px;
124+
background: #F37704;
125+
border: 0.25px solid #C4C4C4;
126+
box-sizing: border-box;
127+
border-radius: 2px;
128+
text-align: center;
129+
color: #FFFFFF;
130+
}
131+
.vp-pf-btn-apply:hover
132+
, .vp-pf-popup-ok:hover {
133+
background: var(--hightlight-color);
134+
}
135+
.vp-pf-btn-cancel
136+
, .vp-pf-popup-cancel {
137+
width: 80px;
138+
height: 30px;
139+
background: #E5E5E5;
140+
border: 0.25px solid #C4C4C4;
141+
box-sizing: border-box;
142+
border-radius: 2px;
143+
text-align: center;
144+
color: #696969;
145+
}
146+
.vp-pf-btn-cancel:hover
147+
, .vp-pf-popup-cancel:hover {
148+
background: #ccc;
149+
}

src/api_block/index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@
6666
<img src="/nbextensions/visualpython/resource/apps/apps_chart.svg">
6767
<div class="vp-apiblock-menu-apps-name">Chart</div>
6868
</div>
69+
<div class="vp-apiblock-menu-apps-item line3" data-menu="profiling" title="Pandas Profiling">
70+
<img src="/nbextensions/visualpython/resource/apps/apps_white.svg">
71+
<div class="vp-apiblock-menu-apps-name">Profiling</div>
72+
</div>
6973
<div class="vp-apiblock-menu-apps-item preparing" data-menu="merge" title="Work In Progress">
7074
<img src="/nbextensions/visualpython/resource/apps/apps_merge.svg">
7175
<div class="vp-apiblock-menu-apps-name">Merge</div>
@@ -186,6 +190,8 @@
186190
<br/><br/>
187191
For more up-to-date information, visit our website :
188192
<a href="https://www.visualpython.ai" target="_blank">www.visualpython.ai</a>
193+
<br/><br/>
194+
<strong>GitHub</strong> is also available! <a href="https://github.com/visualpython/visualpython" target="_blank"><i class="fa fa-github"></i> visualpython</a>
189195
</div>
190196
<div class="vp-apiblock-option-tab-preview" style="display:none;">
191197
<!-- Overall Code Preview-->

src/api_block/init.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,9 @@ define([
306306
width: '600px'
307307
});
308308
break;
309+
case 'profiling':
310+
blockContainer.createAppsPage('nbextensions/visualpython/src/common/vpProfiling');
311+
break;
309312
case 'merge':
310313
// TODO: Merge
311314
break;

0 commit comments

Comments
 (0)