# HG changeset patch # User Shantanu # Date 1271141684 -19800 # Node ID 32d854e62be9c4a1060fa33b0523c3abcf6ebf3a # Parent 9d60720b16b0c9e85ca6447c941b9c9f149465fb Minor edits. diff -r 9d60720b16b0 -r 32d854e62be9 presentations/statistics.tex --- a/presentations/statistics.tex Tue Apr 13 01:19:12 2010 +0530 +++ b/presentations/statistics.tex Tue Apr 13 12:24:44 2010 +0530 @@ -84,7 +84,7 @@ \begin{frame} \frametitle{Structure of the file} - Understanding the structure of sslc1.txt + Understanding the structure of sslc.txt \begin{itemize} \item Each line in the file has a student's details(record) \item Each record consists of fields separated by ';' @@ -107,13 +107,13 @@ \end{itemize} \end{frame} -\begin{frame} - \frametitle{Statistical Analysis: Problem statement} - 1. Read the data supplied in the file \emph{sslc1.txt} and carry out the following: - \begin{block}{} - Draw a pie chart representing proportion of students who scored more than 90\% in each region in Science. - \end{block} -\end{frame} +%% \begin{frame} +%% \frametitle{Statistical Analysis: Problem statement} +%% 1. Read the data supplied in the file \emph{sslc.txt} and carry out the following: +%% \begin{block}{} +%% Draw a pie chart representing proportion of students who scored more than 90\% in each region in Science. +%% \end{block} +%% \end{frame} \begin{frame} \frametitle{Problem statement: explanation} @@ -132,25 +132,17 @@ \item File reading \item Dictionaries \item Parsing -%% \item Arrays \item Plot \end{itemize} \end{frame} \begin{frame}[fragile] \frametitle{Summary} - \begin{block}{lists} - \begin{itemize} - \item Creation. - \item Appending. - \item Iterating through list. - \end{itemize} - \end{block} \begin{block}{Data processing} \begin{itemize} - \item In form of lists. - \item Handling files. - \item for loops + \item Dictionaries + \item String parsing + \item Pie charts \end{itemize} \end{block} \end{frame} diff -r 9d60720b16b0 -r 32d854e62be9 statistics.txt --- a/statistics.txt Tue Apr 13 01:19:12 2010 +0530 +++ b/statistics.txt Tue Apr 13 12:24:44 2010 +0530 @@ -6,7 +6,7 @@ In this session, we will use them and some new concepts to solve a problem/exercise. -We have a file named sslc1.txt. +We have a file named sslc.txt. It contains record of students and their performance in one of the State Secondary Board Examination. It has 180, 000 lines of record. We are going to read it and process this data. We can see the content of file by opening with any text editor. Please don't edit the data. @@ -119,7 +119,7 @@ We first create an empty dictionary science = {} -now we read the record data one by one from the file sslc1.txt +now we read the record data one by one from the file sslc.txt for record in open('sslc.txt'):