예제 #1
0
 def testFilterColumnDFAdvForGreaterThanClosingPrice(self):
     stockData = {
         'Company': ["BlackStone", "KKR", "Chase", "Bank Of America", "Wells Fargo", "Morgan Stanley"],
         "Closing Price": [56.26, 21.60, 100.21, 26.75, 84.61, 246.25],
         "LocationHQ": ["New York City,NY", "New York City,NY", "New York City,NY", "Charlotte, NC",
                        "San Francisco, CA", "New York City,NY"]
     }
     npsy = NumpySciPy()
     df = npsy.initDataFrame(stockData)
     actual = npsy.filterColumnDFAdv(df, "Closing Price", 100.21,filterType="GREATER_THAN")
예제 #2
0
 def testFilterColumnDFAdvForCompanyEmptyDF(self):
     stockData = {
     }
     npsy = NumpySciPy()
     df = npsy.initDataFrame(stockData)
     try:
         actual = npsy.filterColumnDFAdv(df, "Company", "BlackStone")
         print(actual)
     except(KeyError):
         print("Key Doesn't Exist")