-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdm_lib.py
28 lines (26 loc) · 883 Bytes
/
dm_lib.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# this main script is to create a genenral run file for datamind runtime environment
# following code block will import all contents for the programming.
def dm_setup():
try:
import sklearn
import pandas as pd
import numpy as np
import sweetviz as sv
import seaborn as sns
except ImportError:
userChoice = input("Found missing package, auto install? (yes/no):\n")
if userChoice.lower()=="yes":
! pip install sklearn
! pip install pandas
! pip install numpy
! pip install sweetviz
! pip install seaborn
elif userChoice.lower() =="no":
print("exiting Datamind initial setup....")
else:
print("don't know what I have read. terminating.....BANG!")
except Exception as error:
print(error,False)
print(error.__class__.__name__ + ": " + error.message)
if __name__=="__main__":
dm_setup()