Skip to content

Commit 7f10ea7

Browse files
committed
Fixed #233 - Update File, Import
- Add pyarrow at import app - Add file format Parquet at file read and write
1 parent 7cdcffe commit 7f10ea7

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

visualpython/js/com/com_Config.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ define([
7575
'import matplotlib.pyplot as plt',
7676
'%matplotlib inline',
7777
'import seaborn as sns',
78-
'import plotly.express as px'
78+
'import plotly.express as px',
79+
'import pyarrow as pa'
7980
],
8081
'matplotlib customizing': [
8182
'import matplotlib.pyplot as plt',
@@ -132,7 +133,8 @@ define([
132133
'from plotly.offline import init_notebook_mode',
133134
'init_notebook_mode(connected=True)'
134135
]
135-
}
136+
},
137+
{ library: 'pyarrow', alias:'pa' },
136138
]
137139
}
138140

@@ -208,6 +210,10 @@ define([
208210
'statsmodels.api': {
209211
code: 'import statsmodels.api as sm',
210212
type: 'package'
213+
},
214+
'pyarrow': {
215+
code: 'import pyarrow as pa',
216+
type: 'package'
211217
}
212218
}
213219

visualpython/js/m_apps/Import.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ define([
3737
'from plotly.offline import init_notebook_mode',
3838
'init_notebook_mode(connected=True)'
3939
], checked: false
40-
}
40+
},
41+
{ i0: 'pyarrow', i1: 'pa', type: 'module', checked: false},
4142
],
4243
'machine-learning': [
4344
{ i0: 'sklearn.model_selection', i1: 'train_test_split', type: 'function' },

visualpython/js/m_library/m_pandas/readFile.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ define([
4848
'csv': 'csv',
4949
'excel': 'xlsx',
5050
'json': 'json',
51-
'pickle': ''
51+
'pickle': '',
52+
'parquet': 'parquet'
5253
}
5354
this.dataPath = 'https://raw.githubusercontent.com/visualpython/visualpython/main/visualpython/data/sample_csv/';
5455
this.fileResultState = {
@@ -60,7 +61,8 @@ define([
6061
'csv': 'pd_readCsv',
6162
'excel': 'pd_readExcel',
6263
'json': 'pd_readJson',
63-
'pickle': 'pd_readPickle'
64+
'pickle': 'pd_readPickle',
65+
'parquet': 'pd_readParquet'
6466
},
6567
selectedType: 'csv',
6668
package: null

visualpython/js/m_library/m_pandas/toFile.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ define([
4848
'csv': 'csv',
4949
'excel': 'xlsx',
5050
'json': 'json',
51-
'pickle': ''
51+
'pickle': '',
52+
'parquet': 'parquet'
5253
}
5354
this.dataPath = 'https://raw.githubusercontent.com/visualpython/visualpython/main/visualpython/data/sample_csv/';
5455
this.fileResultState = {
@@ -60,7 +61,8 @@ define([
6061
'csv': 'pd_toCsv',
6162
'excel': 'pd_toExcel',
6263
'json': 'pd_toJson',
63-
'pickle': 'pd_toPickle'
64+
'pickle': 'pd_toPickle',
65+
'parquet': 'pd_toParquet'
6466
},
6567
selectedType: 'csv',
6668
package: null

0 commit comments

Comments
 (0)