Showing posts with the label sas excel import

Featured Post

Best Practices for Handling Duplicate Elements in Python Lists

Here are three awesome ways that you can use to remove duplicates in a list. These are helpful in resolving your data analytics solutions.  01. Using a Set Convert the list into a set , which automatically removes duplicates due to its unique element nature, and then convert the set back to a list. Solution: original_list = [2, 4, 6, 2, 8, 6, 10] unique_list = list(set(original_list)) 02. Using a Loop Iterate through the original list and append elements to a new list only if they haven't been added before. Solution: original_list = [2, 4, 6, 2, 8, 6, 10] unique_list = [] for item in original_list:     if item not in unique_list:         unique_list.append(item) 03. Using List Comprehension Create a new list using a list comprehension that includes only the elements not already present in the new list. Solution: original_list = [2, 4, 6, 2, 8, 6, 10] unique_list = [] [unique_list.append(item) for item in original_list if item not in unique_list] All three methods will result in uni

Write and Read Excel files into SAS Studio

The point is how to import an excel file into SAS. Step by step process given on reading Excel file into SAS and writing Excel file from SAS. SAS vs Excel Files Reading an Excel file into SAS Suppose that you have an Excel spreadsheet called auto.xlsx. The data for this spreadsheet is shown below: MAKE MPG WEIGHT PRICE AMC Concord 22 2930 4099 AMC Pacer 17 3350 4749 AMC Spirit 22 2640 3799 Buick Century 20 3250 4816 Buick Electra 15 4080 7827 Import Wizard Using the Import Wizard is an easy way to import data into SAS. The Import Wizard can be found on the drop-down file menu. Although the Import Wizard is easy it can be time-consuming if used repeatedly. The very last screen of the Import Wizard gives you the option to save the statements SAS uses to import the data so that they can be used again. The following is an example that uses common options and also shows that the file was imported correctly. PROC IMPORT OUT= WORK.auto1 DATAFILE= "C:\auto.xl" D