- Minitab Cookbook
- Isaac Newton
- 427字
- 2021-07-16 12:29:19
Creating a subset of data in a new worksheet
Here, we will want to obtain a smaller set of data from a large worksheet. This is useful when we do not want to analyze all the data, or maybe only a small portion is of interest to us. We will create a subset of this worksheet to look only at the most recent years, that is, from 2000 onwards.
Getting ready
The data shown in the following screenshot is from the Met office (http://www.metoffice.gov.uk/climate/uk/stationdata/) and shows weather details for the Oxford weather station on a monthly basis from 1853. We will subset the data to view the results from 2000 onwards. Select the Oxford station data and copy the data into Minitab.
Note
When copying the data into Minitab from the website, only select the information for the year and weather. Copying the column header information will create text columns. Minitab only allows one header for column names, and the dataset here has a header for names and a second header for units. It is advised that we only grab the information for now and rename the columns afterwards.
The Oxford weather (cleaned).mtw
file is provided in the code bundle.

How to do it...
The following instructions will generate a new worksheet of weather data 2000 onwards:
- Go to the Data menu and click on Subset Worksheet.
- Rename the new worksheet as
Temperature for 2000 onwards
and click on the Condition button. - In the Condition section, double-click on the Year column to move this into the Condition section, and then add
>= 2000
, as shown in the following screenshot. Then click on OK twice.
How it works…
Subset worksheet can create a new worksheet based on an entered condition, row numbers, or selected data that we have brushed on a chart.
This gives a bit more control than split worksheet, and we only generate one worksheet.
There's more…
With this command, data can be excluded or included very quickly.
Row numbers can be specified in the Row numbers field, either singly, with a space between each value (for example, 2 4 8 9 10
), or a range of row numbers can be entered by using a colon (for example, 100:150
).
The Condition section works in the same way as the calculator. Multiple conditions can be added with the use of And, Or, and Not. Text values should be referred to within double quotes (for example, "April"
) and date formatted data should be used as DATE("05/11/2000")
.
See also
- The Splitting a worksheet by categorical column recipe
- 讓財報說話:世界500強CFO帶你輕松讀財報(鮮讀版)
- Azure Strategy and Implementation Guide
- 博弈論及其在經濟管理中的應用
- Securing Hadoop
- 基本有用的計量經濟學
- 大數據搜索與挖掘及可視化管理方案 :Elastic Stack 5:Elasticsearch、Logstash、Kibana、X-Pack、Beats (第3版)
- 陜西國家統計調查專題研究集萃(2006—2015)
- AO2011實用手冊
- 2016年度注冊會計師全國統一考試專用輔導教材(圖解版):審計
- 2017年度注冊會計師全國統一考試專用教材(圖解版):審計
- 中國審計市場:制度變遷與競爭行為
- Stata統計分析與行業應用案例詳解(第2版)
- 政策建模技術:CGE模型的理論與實現
- 中國國內生產總值核算問題研究
- Force.com Tips and Tricks