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

xlsx_to_FNRN

class reliability.Convert_data.xlsx_to_FNRN(path, **kwargs)

Converts data from xlsx format into FNRN format. The xlsx format is a Microsoft Excel xlsx file.

Parameters:

path (str) – The filepath for the xlsx file. Note that you must prefix this with r to specify it as raw text.

Returns:

  • failures (array) – failure times

  • num_failures (array) – the number of failures for each failure time

  • right_censored (array) – right censored times

  • num_right_censored (array) – the number of right censored for each right censored time

Notes

For example usage, please see the online documentation.

The function is expecting the xlsx file to have columns in FNRN format. If they are in another format (FR, XCN) then you will need to use the appropriate function for that format.

A reduced form (FN) is accepted and all values will be assumed to be failures.

print()

This will print a dataframe of the data in FNRN format to the console

write_to_xlsx(path, **kwargs)

This will export the data in FNRN format to an xlsx file at the specified path.

Parameters:
  • path (str) – The file path of the xlsx file to be written

  • kwargs – Keyword arguments passed directly to pandas