I have a code in production that requires to read certain modules if a parameter is given 1 and should not read certain modules if a parameter is zero. Here is a simple example:
global parameter
if parameter==0: 
   import numpy as np 
if parameter ==1:
   import pandas as pd
Is there anyway to achieve this in python? I cannot import both modules at the same time.
 
    