Archive for 2015
MxxN = M^M^M^....M for N times - Interview Question (DP Analytics) [Solved in Python]

DP Analytics, a well-known analytics company came up with an interestingly logical written interview test.
Question:
2xx2 = 4
2xx3 = 16
2xx4 = 65536 = 2^16
3xx2 = 27
3xx3 = 7625597484987 = 3^27
4x3 = 64
2xxx3 = 65536
2xxx3 = 2xxx4
In general,
MxxN.
Tuesday, October 13, 2015
Posted by Netbloggy
Learning SAS: How to draw simple BAR charts in SAS?
Any data analysis is not complete without visualization and now it's time for us to learn how to draw simple BAR charts in SAS. We've used PROC SGPLOT to illustrate this. SGPLOT works fine in SAS University Edition too.
Problem 1:
Using the SAS.
Friday, October 2, 2015
Posted by Netbloggy
Learning SAS: How to create a SAS report in .html file using ODS?
In our previous blogposts, we discussed about different ways of tweaking the way we display our output. Now it's time for something more advanced. We're in the age of Web and sometimes our company might require our output in HTML format either to upload.
Learning SAS: How to sort variables while displaying the frequency output?
Sometimes it's not desirable just to display the output of the PROC FREQ as it is. As an analyst, sometimes our organization would require us to tweak it a bit.
Problem:
Using the SAS data set Blood, produce a table of frequencies for BloodType,.
Learning SAS: How to handle missing values while counting frequencies
Missing values are very obvious in any raw dataset and it's very important for an analyst to know to how to handle them. Especially while counting frequencies, Missing values can give misleading figures.
Problem:
Using the data set Blood, produce frequencies.
Learning SAS: Counting Frequencies - PROC FREQ
As PROC MEANS is very helpful in performing various operations on Numeric variables, PROC FREQ can be used to count frequencies of both character and numeric variables,
in one-way, two-way (Crosstabs/Contingency Tables), and three-way tables.
Problem.
Learning SAS: How to create Summary Dataset using PROC MEANS
As we mentioned in the previous post, PROC MEANS is our handy option to create a new summary dataset that can be used in other data steps or Procedures. Here we'll show how to create a summary dataset using PROC MEANS.
Problem:
Using the SAS data set.
Learning SAS: Summarizing Data (PROC MEANS)
We've seen the basic data manipulation options with SAS in our previous blogpost and it's time for us to understand how to report those processed data. And the first think that comes in this journey is PROC MEANS.
People think of PROC MEANS just as.
Learning SAS: Character Functions
Like various numeric functions that help us to process numeric data, SAS has a bunch of Character Functions to easily process Characters.
Problem:
Clean the input data where Weight & Height are characters but remove
the units after the numbers.
Saturday, September 19, 2015
Posted by Netbloggy
Learning SAS: Tweaking PROC PRINT to display the data
PROC PRINT in SAS has a lot of options which can help us tweak the way we display our data.
Options like n = caption of summary, firstobs = no. of first observations & obs = last observation to be processed.
Problem 1:
List the first 6 observations.
Learning SAS: Arrays in SAS
Unlike many other programming languages, Arrays in SAS don't store the values but just the pointers to the actual values (very much like C Pointers).
Problem:
Using the SAS data set Scores, create a new, temporary SAS data set (reversed)
where the.
Learning SAS: Numeric Functions
Sometimes it's just easier to use in-built SAS functions while processing the data rather than writing many complex statements in the DATA step. This is a simple peek into some of the numeric functions of SAS.
Problem:
Count the number of missing values.
Posted by Netbloggy
Learning SAS: Subsetting & Combining SAS Data sets
As we've learnt how to process our input data with conditions and loops, it's also equally important for us to process our SAS datasets - more prominent of which are Subsetting & Combining SAS Data sets.
Problem:
Using the SAS data set Blood,.
Learning SAS - Working with Dates
SAS offers a lot of flexible functions in reading and writing Dates. Let's explore some of it.
Problem 1:
Compute a person's age in years
Input:
001 10/21/1950 05122003 08/10/65 23Dec2005
002 01/01/1960 11122009 09/13/02 02Jan1960
Solution:
data.
Friday, September 18, 2015
Posted by Netbloggy
Learning SAS - Looping with Condition (DO WHILE & DO UNTIL)
We learnt about Conditional processing and Iterative Processing, but what if we could combine both of them and use effectively? Hence comes DO WHILE & DO UNTIL.
Problem 1:
Generate a table of integers and squares starting at 1 and ending when the.
Learning SAS - Iterative Processing : Looping
The primary objective of computer is to compute mathematical computations of big scale faster than human beings. We humans can write down multiplication table of number 5 till 10th level or maybe 100th level, but we can make computer write down.
Learning SAS - Conditional Processing - IF-THEN-ELSE
The most important part of any programming language is conditional processing. The general syntax goes like this:
if condition then
--statements;
else if condition then
-- more statements;
else if condition then
-- more statements;
...
else
.
Time to learn SAS with Free SAS University Edition & Ron Cody's book
In the age of Rs and Pythons, SAS is still the unconquered leader at least in the domain of Banking and Finance. SAS as a statistical package shares many similarities with Mainframe systems. Even after the rise of cloud computing and Distributed systems,.
Solving "InternetOpenUrl failed: 'A connection with the server could not be established'" Error in RStudio
Just when I was trying to install a new package in my RStudio using install.package() or the GUI way, my RStudio suddenly threw a long error where "InternetOpenUrl failed: 'A connection with the server could not be established'" repeated often. That.
Creating Histograms using matplotlib of Python [Hands-on]

Histogram is the best way to display frequency of a data and here we are to create one. So far we've dealt with text files and now it's time to show some progress and work with some real-world data hence this time, it's going to be a csv (comma-separated.