xlsx_to_XCN(path, censor_code_in_xlsx=None, failure_code_in_xlsx=None, censor_code_in_XCN='C', failure_code_in_XCN='F', **kwargs)¶
xlsx_to_XCN data format converter
Inputs: path - the filepath for the xlsx file. Note that you must prefix this with r to specify it as raw text. censor_code_in_xlsx - specify the censor code you have used if it does not appear in the defaults (see below).*default censor codes that will be recognised (not case sensitive): ‘R’, ‘RC’, ‘RIGHT CENS’, ‘RIGHT CENSORED’, ‘C’, ‘CENSORED’, ‘CENS’, ‘S’, ‘SUSP’, ‘SUSPENSION’, ‘SUSPENDED’, ‘UF’, ‘UNFAILED’, ‘UNFAIL’, ‘NF’, ‘NO FAIL’, ‘NO FAILURE’, ‘NOT FAILED’, 1
- failure_code_in_xlsx - specify the failure code you have used if it does not appear in the defaults (see below).
- *default failure codes that will be recognised (not case sensitive): ‘F’, ‘FAIL’, ‘FAILED’, ‘FAILURE’, 0
censor_code_in_XCN - specify the censor code to be used in XCN format. Default is ‘C’ failure_code_in_XCN - specify the failure code to be used in XCN format. Default is ‘F’
Output: X - event time C - censor code N - number of events at each event time
Methods: print() - this will print a dataframe of the data in XCN format to the console write_to_xlsx() - this will export the data in XCN format to an xlsx file at the specified path.
For example usage, please see the online documentation at: https://reliability.readthedocs.io/en/latest/Importing%20data%20from%20Excel.html
Note that the function is expecting the xlsx file to have columns in XCN format. If they are in another format (FR, FNRN) then you will need to use the appropriate function for that format. A reduced form (XC) is accepted and all values will be assumed to have a quantity (N) of 1.