%% Import Explorer to help you with importing table data
% Jiro's Pick this week is Import Explorer for tables by Jan Studnicka.
% When importing data as a table, you can use detectImportOptions to customize how you bring in your data. You can choose to import specific columns, specify the data type of each column, specify how to treat missing values, and many more.
%% Import Explorer
% Jan's entry is a visual tool to help with this customization. It also lets you save the output for detectImportOptions so that you can programmatically reproduce the operation. See this in action.
%
%% Programmatic Approach
% As a comparision, here's how you would do it programmatically from scratch.

opts = detectImportOptions("airlinesmall.csv")
opts.VariableTypes([9 17 18]) = {'categorical'};
opts.SelectedVariableNames = opts.VariableNames([1 2 3 5 7 9 10 15 16 17 18]);
data = readtable("airlinesmall.csv",opts);

%% Import Tool
% Of course, there is the Import Tool that comes with MATLAB. You can do many of these customizations from the tool.
%
% Jan's Import Explorer gives you a bit more options, since detectImportOptions provide those. In addition, Jan's tool works with multiple files, in which case it uses the datastore function under the hood.
% A small request I have is for this to work with other file types, such as Excel files. Currently, this tool only works with CSV and TXT files.
%% Comments
% Give this a try and let us know what you think here or leave a comment for Jan.