added total_seconds function to calculate total seconds since epoch, test_time_elapsed column to help with dataframe comparison

Signed-off-by: Dipti <dipti.dhond@candelatech.com>
This commit is contained in:
Dipti
2021-02-17 12:47:40 -08:00
parent d1c67870f6
commit b1ebef8f19
3 changed files with 36 additions and 39 deletions

View File

@@ -580,6 +580,10 @@ class LFCliBase:
def get_milliseconds(self,
timestamp):
return (timestamp - datetime.datetime(1970,1,1)).total_seconds()*1000
def get_seconds(self,
timestamp):
return (timestamp - datetime.datetime(1970,1,1)).total_seconds()
def replace_special_char(self,
str):
@@ -626,15 +630,11 @@ class LFCliBase:
#takes any format of a file and returns a dataframe of it
def file_to_df(self,file_name):
return pd.read_csv(file_name)
#get difference of all common columns in 2 dataframes. store in
if file_name.split('.')[-1] == 'csv':
return pd.read_csv(file_name)
def compare_two_df(self,dataframe_one=None,dataframe_two=None):
#get the columns to be compared
pass
#return compared_df