https://raw.githubusercontent.com/MatthewReid854/reliability/master/docs/images/logo.png

FR_to_FNRN

class reliability.Convert_data.FR_to_FNRN(failures, right_censored=None)

FR_to_FNRN data format converter

Inputs: failures - array or list right censored - array or list. Optional input.

Output: failures num_failures right_censored num_right_censored

Methods: print() - this will print a dataframe of the data in FNRN format to the console write_to_xlsx() - this will export the data in FNRN format to an xlsx file at the specified path.

Example usage: FNRN = FR_to_FNRN(failures=[1,1,2,2,3], right_censored=[9,9,9,9,8,8,7]) print(FNRN.failures)

>>> [1 2 3]
print(FNRN.num_failures)
>>> [2 2 1]
print(FNRN.right_censored)
>>> [7 8 9]
print(FNRN.num_right_censored)
>>> [1 2 4]
FNRN.print()
>>> Data (FNRN format)
    failures  number of failures  right censored  number of right censored
           1                   2               7                         1
           2                   2               8                         2
           3                   1               9                         4
print()
write_to_xlsx(path, **kwargs)