author | anand |
Sun, 07 Nov 2010 01:18:26 +0530 | |
changeset 390 | 69f285b3a5ed |
parent 277 | d4cee7ebcf9b |
permissions | -rw-r--r-- |
277
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
1 |
#+LaTeX_CLASS: beamer |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
2 |
#+LaTeX_CLASS_OPTIONS: [presentation] |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
3 |
#+BEAMER_FRAME_LEVEL: 1 |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
4 |
|
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
5 |
#+BEAMER_HEADER_EXTRA: \usetheme{Warsaw}\usecolortheme{default}\useoutertheme{infolines}\setbeamercovered{transparent} |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
6 |
#+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args) %4BEAMER_col(Col) %8BEAMER_extra(Extra) |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
7 |
#+PROPERTY: BEAMER_col_ALL 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 :ETC |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
8 |
|
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
9 |
#+LaTeX_CLASS: beamer |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
10 |
#+LaTeX_CLASS_OPTIONS: [presentation] |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
11 |
|
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
12 |
#+LaTeX_HEADER: \usepackage[english]{babel} \usepackage{ae,aecompl} |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
13 |
#+LaTeX_HEADER: \usepackage{mathpazo,courier,euler} \usepackage[scaled=.95]{helvet} |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
14 |
|
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
15 |
#+LaTeX_HEADER: \usepackage{listings} |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
16 |
|
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
17 |
#+LaTeX_HEADER:\lstset{language=Python, basicstyle=\ttfamily\bfseries, |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
18 |
#+LaTeX_HEADER: commentstyle=\color{red}\itshape, stringstyle=\color{darkgreen}, |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
19 |
#+LaTeX_HEADER: showstringspaces=false, keywordstyle=\color{blue}\bfseries} |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
20 |
|
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
21 |
#+TITLE: Loading data from files |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
22 |
#+AUTHOR: FOSSEE |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
23 |
#+EMAIL: |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
24 |
#+DATE: |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
25 |
|
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
26 |
#+DESCRIPTION: |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
27 |
#+KEYWORDS: |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
28 |
#+LANGUAGE: en |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
29 |
#+OPTIONS: H:3 num:nil toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
30 |
#+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:nil pri:nil tags:not-in-toc |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
31 |
|
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
32 |
* Outline |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
33 |
+ Read data from files with a single column of data |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
34 |
+ Read data from files with multiple columns |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
35 |
* Question 1 |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
36 |
Read the file ~pendulum_semicolon.txt~ which contains the same data |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
37 |
as ~pendulum.txt~, but the columns are separated by semi-colons |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
38 |
instead of spaces. Use the IPython help to see how to do this. |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
39 |
* Solution 1 |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
40 |
#+begin_src python |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
41 |
In []: L, T = loadtxt('/home/fossee/pendulum_semicolon.txt', unpack=True, delimiter=';') |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
42 |
|
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
43 |
In []: print L |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
44 |
|
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
45 |
In []: print T |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
46 |
#+end_src |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
47 |
* Summary |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
48 |
+ Read data from files, containing a single column of data using the |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
49 |
~loadtxt~ command. |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
50 |
+ Read multiple columns of data, separated by spaces or other |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
51 |
delimiters. |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
52 |
* Thank you! |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
53 |
#+begin_latex |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
54 |
\begin{block}{} |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
55 |
\begin{center} |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
56 |
This spoken tutorial has been produced by the |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
57 |
\textcolor{blue}{FOSSEE} team, which is funded by the |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
58 |
\end{center} |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
59 |
\begin{center} |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
60 |
\textcolor{blue}{National Mission on Education through \\ |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
61 |
Information \& Communication Technology \\ |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
62 |
MHRD, Govt. of India}. |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
63 |
\end{center} |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
64 |
\end{block} |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
65 |
#+end_latex |
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
66 |
|
d4cee7ebcf9b
Slides for loading data from files LO.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
67 |