Remove pandas import from some notebooks (#13481)

This commit is contained in:
Charles Gagnon
2020-11-19 08:19:20 -08:00
committed by GitHub
parent c7cca5afea
commit ddd0b8b4bc
9 changed files with 9 additions and 57 deletions

View File

@@ -65,13 +65,7 @@
{
"cell_type": "code",
"source": [
"import pandas,sys,os,json,html,getpass,time, tempfile\n",
"pandas_version = pandas.__version__.split('.')\n",
"pandas_major = int(pandas_version[0])\n",
"pandas_minor = int(pandas_version[1])\n",
"pandas_patch = int(pandas_version[2])\n",
"if not (pandas_major > 0 or (pandas_major == 0 and pandas_minor > 24) or (pandas_major == 0 and pandas_minor == 24 and pandas_patch >= 2)):\n",
" sys.exit('Please upgrade the Notebook dependency before you can proceed, you can do it by running the \"Reinstall Notebook dependencies\" command in command palette (View menu -> Command Palette…).')\n",
"import sys,os,json,html,getpass,time, tempfile\n",
"def run_command(command):\n",
" print(\"Executing: \" + command)\n",
" !{command}\n",