def testappendDFReturnsEmptyDataFame(self): stocksData = { } npsy = NumpySciPy() df = npsy.initDataFrame(stocksData) actual = npsy.appendDF(dataframe=df,appendDataFrame=df) expected = pd.DataFrame(df).append(df)
def testdropDuplicateDFReturnsEmptyDataFame(self): stocksData = { } npsy = NumpySciPy() df = npsy.initDataFrame(stocksData) df = npsy.appendDF(dataframe=df,appendDataFrame=df) actual = npsy.dropDuplicatesDF(df) expected = pd.DataFrame(stocksData).append(df).drop_duplicates()
def testdropDuplicateReturnsDataFame(self): stockData = { "Blackstone": [49.56, 50.70, 51.18, 52.80, 52.87, 24.24, 24.60, 49.56, 26.90, 26.66] } npsy = NumpySciPy() df = npsy.initDataFrame(stockData) df = npsy.appendDF(dataframe=df,appendDataFrame=df) actual = npsy.dropDuplicatesDF(df) expected = pd.DataFrame(stockData).append(df).drop_duplicates()
def testappendDFReturnsDataFame(self): stocksData = { "Blackstone": [49.56, 50.70, 51.18, 52.80, 52.87, 24.24, 24.60, 26.04, 26.90, 26.66], "KKR": [24.24, 24.60, 26.04, 26.90, 26.66, 24.24, 24.60, 26.04, 26.90, 26.66] } npsy = NumpySciPy() df = npsy.initDataFrame(stocksData) actual = npsy.appendDF(dataframe=df,appendDataFrame=df) expected = pd.DataFrame(stocksData).append(df)