Other types of plots - English
- subtitles off
- captions off
- English
- Questions posted on Forums
- Python Tutorials - English
-
i am using windows 10 and i am geting SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
hi sir, i was trying this and i amfacing thiserror please helpme year, profit = loadtxt('C:\Users\DDay\Downloads\Compressed\company-a-data.txt', unpack=True) File "<ipython-input-7-27db1e0fb82c>", line 1 year, profit = loadtxt('C:\Users\DDay\Downloads\Compressed\company-a-data.txt', unpack=True) ^SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
02-03M 40-50S deepanshu181
Answer last updated on: Sept. 18, 2023, 11:17 a.m.
-
cant understand the working of loadtxt
so much error while using 2nd command. I cant solve this issue
03-04M 10-20S dhurvelalit8@gmail.com
Answer last updated on: Aug. 24, 2021, 10:13 a.m.
-
company-a-data.txt
I am using virtual box for Ubuntu-Linux. And my spoken tutorial files are stored in windows os, so that's why I am not able to open a source code in ubuntu-linux. What should i do now? Each and every time I am facing this problem.
01-02M 40-50S dhurvelalit8@gmail.com
Answer last updated on: Aug. 14, 2021, 4:39 p.m.
-
Getting error in cat and loadtxt
Dear Sir,I place of 'cat command' I am using' %pycat command' to fetch the data in Command Prompt.Is it correct?I am operating python in Windows 10 and while running the loadtxt command i am continuously getting erroryear,profit= loadtxt('C:\Users\Manisha\Desktop\Data code\company-a-data.txt',unpack=True) But I am getting error File "<ipython-input-58-097f699b5275>", line 1 year,profit= loadtxt('C:\Users\Manisha\Desktop\Data code\company-a-data.txt',unpack=True) ^SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escapePlease provide solution of this problem
02-03M 20-30S manishakdey@gmail.com
Answer last updated on: Sept. 7, 2020, 9:35 p.m.
-
company-a-data.txt
company-a-data.txt file is mission, kindly provide the file...
01-02M 30-40S sfti_sk_extc
Answer last updated on: May 4, 2020, 12:19 a.m.
-
loadtxt() is showing ValueError. Help!
Dear Sir/Madam,I'm using Linux Ubuntu.In Spoken Tutorial number 9 for Python, "Other types of plots", I'm receiving a ValueError after inserting input for loadtxt function. Firstly, I download the Code Files for this tutorial. "2-3/company-a-data.txt"Then enter first input as per shown:In [1]: cat /home/hamzak/2-3/company-a-data.txt2.000000000000000000e+03 2.001000000000000000e+03 2.002000000000000000e+03 2.003000000000000000e+03 2.004000000000000000e+03 2.005000000000000000e+03 2.006000000000000000e+03 2.007000000000000000e+03 2.008000000000000000e+03 2.009000000000000000e+03 2.010000000000000000e+032.300000000000000000e+01 5.500000000000000000e+01 3.200000000000000000e+01 6.500000000000000000e+01 8.800000000000000000e+01 5.000000000000000000e+00 1.400000000000000000e+01 6.700000000000000000e+01 2.300000000000000000e+01 2.300000000000000000e+01 1.200000000000000000e+01In [2]: year,profit = loadtxt('/home/hamzak/2-3/company-a-data.txt',dtype=type(int()))---------------------------------------------------------------------------ValueError Traceback (most recent call last)<ipython-input-2-651cfa2ff470> in <module>()----> 1 year,profit = loadtxt('/home/hamzak/2-3/company-a-data.txt',dtype=type(int()))/usr/lib/python2.7/dist-packages/numpy/lib/npyio.pyc\\\\r\\\\n in loadtxt(fname, dtype, comments, delimiter, converters, skiprows, \\\\r\\\\nusecols, unpack, ndmin) 846 vals = [vals[i] for i in usecols] 847 # Convert each value according to its column and store--> 848 items = [conv(val) for (conv, val) in zip(converters, vals)] 849 # Then pack it according to the dtype's nesting 850 items = pack_items(items, packing)ValueError: invalid literal for long() with base 10: '2.000000000000000000e+03'I'm not sure why this is error is occurring, is there something wrong with the company-a-data.txt file?Please advice. Thank you.
02-03M 0-10S hamzak
Answer last updated on: Sept. 7, 2015, 11:17 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
-
Other 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
-
18Parsing 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:
7581 visits
Outline:
Other types of plots scatter pie chart bar chart log illustration of other plots, matplotlib help
Width: | 656 | Height: | 496 |
---|---|---|---|
Duration: | 00:13:36 | Size: | 6 MB |
Show video info