%% Rename Variables in Table
% Read a table from a spreadsheet. The spreadsheet provides a name for each table variable. (Read the columns containing text into table variables that are string arrays.)

T = readtable('outages.csv','TextType','string')

%
% Change the names of the variables Loss, OutageTime, and RestorationTime.

T = renamevars(T,["Loss","OutageTime","RestorationTime"], ...
                 ["Total Cost","Start of Outage","Restoration"])

% Copyright 2019 The MathWorks, Inc.