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

xlsx_to_FR

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

Converts data from xlsx format into FR 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

  • right_censored (array) – right censored times

Notes

For example usage, please see the online documentation.

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

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

print()

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

write_to_xlsx(path, **kwargs)

This will export the data in FR 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