Parsing data - English
- subtitles off
- captions off
- English
- Questions posted on Forums
- Python Tutorials - English
-
Solved the problem in %run command in Windows
math_marks_A = []for line in open("Desktop\student_record.txt"): fields = line.split(";") region_code = fields[0] region_code_stripped = region_code.strip() math_mark_str = fields[5] math_mark = float(math_mark_str) if region_code == "A": math_marks_A.append(math_mark)#make sure to save this in notepad as .py file.# Most of people make error in specifying student_record.txt folder destination.# Execute %run Desktop\marks.py command in ipython3.
10-11M 10-20S mike.driko.87
Answer last updated on: June 17, 2022, 10:50 a.m.
-
1Getting started with ipython
-
2Using the plot command interactively
-
3Embellishing a plot
-
4Saving plots
-
5Multiple plots
-
6Additional features of IPython
-
7loading data from files
-
8Plotting the data
-
9Other types of plots
-
10Getting started with sage notebook
-
11Getting started with symbolics
-
12Using Sage
-
13Using sage to teach
-
14Getting started with lists
-
15Getting started with for
-
16Getting started with strings
-
17Getting started with files
-
Parsing data
-
19Statistics
-
20Getting started with arrays
-
21Accessing parts of arrays
-
22Matrices
-
23Least square fit
-
24Basic datatypes and operators
-
25I O
-
26Conditionals
-
27Loops
-
28Manipulating lists
-
29Manipulating strings
-
30Getting started with tuples
-
31Dictionaries
-
32Sets
-
33Getting started with functions
-
34Advanced features of functions
-
35Using python modules
-
36Writing python scripts
-
37Testing and debugging
Questions posted on ST Forums:
5920 visits
Outline:
Parsing data explain what is parsing strip (with strings) split (with strings) with delimiters specify space as delimiter datatype conversion reading from files do the same problem done with loadtxt (for pendulum) basic parse sslc text
Width: | 640 | Height: | 480 |
---|---|---|---|
Duration: | 00:15:29 | Size: | 6.4 MB |
Show video info