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

FNRN_to_FR

class reliability.Convert_data.FNRN_to_FR(failures, num_failures, right_censored=None, num_right_censored=None)

FNRN_to_FR data format converter

Inputs: failures - array or list num_failures - array or list. Length must match length of failures right_censored - array or list. Optional input. num_right_censored - array or list. Optional Input. Length must match length of right_censored

Output: failures right_censored

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

Example usage: FR = FNRN_to_FR(failures=[1,2,3], num_failures=[1,1,2], right_censored=[9,8,7], num_right_censored=[5,4,4]) print(FR.failures)

>>> [1. 2. 3. 3.]
print(FR.right_censored)
>>> [9. 9. 9. 9. 9. 8. 8. 8. 8. 7. 7. 7. 7.]
FR.print()
>>>  Data (FR format)
     failures  right censored
            1               9
            2               9
            3               9
            3               9
                            9
                            8
                            8
                            8
                            8
                            7
                            7
                            7
                            7
print()
write_to_xlsx(path, **kwargs)