Тёмный
No video :(

Import Data and Analyze with Python 

APMonitor.com
Подписаться 76 тыс.
Просмотров 268 тыс.
50% 1

Python programming language allows sophisticated data analysis and visualization. This tutorial is a basic step-by-step introduction on how to import a text file (CSV), perform simple data analysis, export the results as a text file, and generate a trend. See • Import Data, Analyze, ... for updated video for Python 3.

Опубликовано:

 

19 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 115   
@SHONNER
@SHONNER 7 лет назад
Very cool. Don't know what it all means, but very cool doing plots with Python.
@abhishekmehta5235
@abhishekmehta5235 6 лет назад
Informative in simple words and step by step... very crisp and concise
@ramzoozi
@ramzoozi 7 лет назад
Very useful and helpful video. Thanks for taking the time to prepare this material.
@RM-gm7lu
@RM-gm7lu 8 лет назад
Thanks that was a great tut...i found that watching the earlier videos from the series made what you did in this one much clearer( just a recommendation for those wanting to really understand what going on in this one). Thanks a lot for sharing!
@apm
@apm 8 лет назад
+Rich Mash thanks for the feedback!
@usamabayasrah
@usamabayasrah 2 года назад
Which one, please?
@garydunken7934
@garydunken7934 7 лет назад
Well worth 12 mins. Thanks.
@forgot1o13727
@forgot1o13727 3 года назад
one of the best!
@turkialjrees9692
@turkialjrees9692 9 лет назад
Amazing . thanks. that what you call it tutorial . not just export and import also was plot, math, and re-shape data .....what genuine ,,, very nice
@apm
@apm 9 лет назад
+Turki Aljrees Turki, thanks for the positive feedback. More videos on Python are posted to the online course apmonitor.com/che263 - I hope you enjoy those as well.
@turkialjrees9692
@turkialjrees9692 9 лет назад
+APMonitor.com thank you my friend
@lorisvila8008
@lorisvila8008 4 года назад
Thanks a lot for your video !
@Eskimoz
@Eskimoz 5 лет назад
Super merci pour ce contenu à consommer sans modération.
@boses5320
@boses5320 6 лет назад
Awesome work...nice and clean example. Please go ahead with some complex analysis example. BTW learnt a lot from this one .
@apm
@apm 6 лет назад
More content is available on the free course website at apmonitor.com/che263
@habukproductions6966
@habukproductions6966 3 года назад
Thank a lot
@Andrej158158
@Andrej158158 5 лет назад
finally useful tutorial
@roveradamus
@roveradamus 8 лет назад
Thanks you so much for this video! Made life a lot easier.
@MrPariah88
@MrPariah88 7 лет назад
Super helpful, thank you very much!
@price279
@price279 7 лет назад
Thanx a lot! This video saved me.
@sagarsinghrajpoot3832
@sagarsinghrajpoot3832 5 лет назад
Amazing video
@GQElvie
@GQElvie 4 года назад
appreciate the free video, but you overlooked the novices. you did not mention how to create a script for those who do not know how.
@apm
@apm 4 года назад
You can create a script by selecting "File...New File" in IDLE or else create a new text file and rename the extension to .py Here is info on changing file extensions: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-YlN9ax7yC0A.html I'll keep your comment in mind for future videos. Thanks for that helpful suggestion.
@matthewws5694
@matthewws5694 5 лет назад
Great video
@sreyaghosh6632
@sreyaghosh6632 3 года назад
I am facing an issue with NaN because my .dat file contains complex numbers. Any fix?
@apm
@apm 3 года назад
Try reading the file with pandas and then use dropna to eliminate or fillna to replace NaN. Here is some help: apmonitor.com/pds/index.php/Main/GatherData and apmonitor.com/pds/index.php/Main/CleanseData
@Hisham.....
@Hisham..... 8 месяцев назад
Dear Prof. Thanks for your valuable tut. , I already downloaded the file and I want, after getting your permission, to rpeate your example by using Vscode and Jupyternoot book and then I'll rerecord it and post it my youtub channel, is that possible. sure I'll refer to the source which is your channel ?!!!
@apm
@apm 8 месяцев назад
Yes, thanks for creating new content!
@abdullahalshehri7326
@abdullahalshehri7326 8 лет назад
Well, it's awesome video. Thanks for that.
@apm
@apm 8 лет назад
+Abdullah ALSHEHRI You're welcome - I'm glad that you enjoyed it. Check out other videos and course material at apmonitor.com/che263
@SanaKhan-dd6dl
@SanaKhan-dd6dl 8 лет назад
Good one
@RaviShankarDadhich
@RaviShankarDadhich 7 лет назад
Thanks for this kind help :) :)
@hamadighariani3845
@hamadighariani3845 3 года назад
Hi , where can i find a data file like yours ?
@apm
@apm 3 года назад
Here it is: apmonitor.com/che263/index.php/Main/PythonDataAnalysis
@yulia1346
@yulia1346 8 лет назад
Great video!
@apm
@apm 8 лет назад
+Yulia Kim Thanks for your feedback. There are other Python videos on the Engineering Programming Course at apmonitor.com/che263
@gabrinegaum
@gabrinegaum Год назад
The link for data_file.txt is: ru-vid.com?event=video_description&redir_token=QUFFLUhqbVlGUUVGM1Y5bGYydjdJQlhOU200VW9iSnZyZ3xBQ3Jtc0tsYlh0Y1poZHIzNWV3UXA0ZHNyTDZQRUxpM3FBQTFnR3lmTnEtOERZU0U4Q2REMjUzUjBpb1dtaFFEUTlEZ1pJdkFQUjA5UThJTm1Demt1X1pES2M5OG55NFcydzdEUTlpNGpTVjRWaXpzMWp4aVJhbw&q=http%3A%2F%2Fapmonitor.com%2Fche263%2Fuploads%2FMain%2Fmatlab_data_analysis.zip&v=E56egH10RJA
@kisore7921
@kisore7921 8 лет назад
thx for the quick reply and can u show me some examples to split the letters and numbers in a text file ?
@apm
@apm 8 лет назад
+kisore hari Yes, just designate a delimiter character like I did at 1:38. Most text files use a space, tab, or comma.
@apm
@apm 8 лет назад
+APMonitor.com You may also want to switch to pandas if you have mixed data such as floats and strings. See ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-FXhED53VZ50.html
@andreasvictorsimanungkalit
@andreasvictorsimanungkalit 7 лет назад
very useful and helpful for me. Where i can download sample data according to the video ? Nice to hear your feedback :) Thanks,
@apm
@apm 7 лет назад
+Andreas Victor Simanungkalit, the source code and data file is available from apmonitor.com/che263/index.php/Main/PythonDataAnalysis
@ashishkalyan275
@ashishkalyan275 6 лет назад
i have data in ascii format and when i doing this same process i interface with following Traceback (most recent call last): File "C:\Users\Ashish\Desktop\assp.py", line 4, in data = np.genfromtext ('ch00_B0833-45_20150612_191438_010_1', delimiter=',') AttributeError: 'module' object has no attribute 'genfromtext' >>>
@apm
@apm 6 лет назад
Leave out the extra 'e' in the function call: docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.genfromtxt.html
@tracygrygiel4701
@tracygrygiel4701 7 лет назад
Awesome video -- this really helped me a lot!
@preeningPARK
@preeningPARK 7 лет назад
Hello, first of all i wanna say thanks for the video, i have two questions:What version of python are you using, Where does the txt file have to be saved to be called by the command? Thanks!
@apm
@apm 7 лет назад
I used Python 2.7 for this example although it can also be run with Python 3+ if you just add parenthesis around the print statement at 3:28. The txt file needs to be in your working directory (same as myScript.py) for this example. It is possible to navigate to different directories but this example requires the data (txt) file in the same directory. There is another example using Pandas along with source code posted here: apmonitor.com/che263/index.php/Main/PythonDataAnalysis
@apm
@apm 9 лет назад
George, you'll also need to install numpy with Python. Here are all of the installation files for Windows: apmonitor.com/che263/index.php/Main/PythonIntroduction
@poojamahindrakar2389
@poojamahindrakar2389 7 лет назад
Hello sir, can you please guide on how to import image data and analyze with python in jupyter notebook?
@apm
@apm 7 лет назад
+pooja mahindrakar, here are some tips to get started: stackoverflow.com/questions/3735553/how-do-i-read-an-image-file-using-python
@nooneknown
@nooneknown 7 лет назад
Nice video! Can you explain why the following can happen: time = time - time[0] i mean time is defined. Do you redefine it by the time module minus the first point and now that is the new definition of time?
@apm
@apm 7 лет назад
Simon Chemnitz-Thomsen, yes - it is just for convenience. t[0] is very large so I just time shift everything to start at t[0]=0.
@nooneknown
@nooneknown 7 лет назад
Thanks alot great video
@kundan_28
@kundan_28 6 лет назад
how can we plot derivative plot of discrete data points....please help
@apm
@apm 6 лет назад
I'd recommend changing the style to circles 'o' or points '.' - here are tutorials on plotting: apmonitor.com/che263/index.php/Main/PythonPlots
@KirbyPwnz13
@KirbyPwnz13 6 лет назад
So is this data science? This looks very interesting.
@apm
@apm 6 лет назад
Data science is a lot more than just this video but it is a good start. Check out apmonitor.com/che263
@KirbyPwnz13
@KirbyPwnz13 6 лет назад
APMonitor.com thanks I’ll check it out!
@mlotfi2005
@mlotfi2005 9 лет назад
Hi, thanks for this tutorial, can you please post the data text file ? Thanks
@apm
@apm 9 лет назад
+Abdel Latif Abdel, I don't think I have the original data file. However, the following should work if you copy it into a text file such as data_file.txt: 1.000E+01,4.053E+02,3.926E+02,3.930E+02,4.026E+02,nan,nan,nan,nan 1.050E+01,3.904E+02,3.997E+02,4.084E+02,4.100E+02,nan,nan,nan,nan 1.100E+01,4.091E+02,3.934E+02,3.923E+02,4.035E+02,nan,nan,nan,nan 1.150E+01,4.015E+02,4.011E+02,4.044E+02,4.059E+02,nan,nan,nan,nan 1.200E+01,3.904E+02,3.925E+02,4.025E+02,3.948E+02,nan,nan,nan,nan 1.250E+01,4.095E+02,4.040E+02,3.960E+02,4.051E+02,nan,nan,nan,nan 1.300E+01,4.018E+02,3.916E+02,3.939E+02,3.979E+02,nan,nan,nan,nan 1.350E+01,3.931E+02,3.984E+02,3.950E+02,3.939E+02,nan,nan,nan,nan 1.400E+01,4.066E+02,3.927E+02,4.000E+02,3.992E+02,nan,nan,nan,nan 1.450E+01,3.953E+02,4.076E+02,4.098E+02,3.966E+02,nan,nan,nan,nan 1.500E+01,4.095E+02,3.976E+02,3.901E+02,4.018E+02,nan,nan,nan,nan 1.550E+01,3.948E+02,4.036E+02,3.997E+02,4.015E+02,nan,nan,nan,nan 1.600E+01,4.018E+02,3.983E+02,4.056E+02,4.047E+02,nan,nan,nan,nan 1.650E+01,4.000E+02,3.923E+02,3.952E+02,4.055E+02,nan,nan,nan,nan 1.700E+01,3.928E+02,3.907E+02,3.960E+02,3.909E+02,nan,nan,nan,nan 1.750E+01,3.921E+02,3.978E+02,4.060E+02,3.996E+02,nan,nan,nan,nan 1.800E+01,4.070E+02,4.056E+02,3.955E+02,4.068E+02,nan,nan,nan,nan 1.850E+01,4.010E+02,3.913E+02,4.019E+02,3.944E+02,nan,nan,nan,nan 1.900E+01,4.085E+02,3.949E+02,4.031E+02,4.090E+02,nan,nan,nan,nan 1.950E+01,3.968E+02,4.018E+02,3.975E+02,3.963E+02,nan,nan,nan,nan 2.000E+01,4.037E+02,4.037E+02,4.036E+02,3.907E+02,nan,nan,nan,nan
@x_s3058
@x_s3058 7 лет назад
great!!
@crazedthinker6678
@crazedthinker6678 7 лет назад
My "Text Document" doesn't have the "txt" extension on the end and doesn't change when I add the "py" when I rename it. It just stays as a normal "Text Document". Any other way I can change it to "py"?
@apm
@apm 7 лет назад
+New Rider NT, you need to show Windows file extensions. Navigate to "Folder Options"..."View" and unselect the option to hide extensions for known file types. This will allow you to view and change file extensions.
@crazedthinker6678
@crazedthinker6678 7 лет назад
APMonitor.com Thanks it worked and thanks for the great video.
@asifnizamani7513
@asifnizamani7513 6 лет назад
sir how you learn python or matlab programing language i was learned to try to learning programing last 1.5 years 1st 2 month i learn matlab saw various lectures, then move to the python their liabraries numpy, pandas , matplotlib i almost forgot most of the things i saw various lectures videos on you tube but now i just limited on labview please tell me advice for me and all the world students how to learn any programing language please sir share also your experience and any tips and free pdf or notebook.
@apm
@apm 6 лет назад
If you need help with starting a programming language such as python, there are many wonderful tutorials online such as code.org. labview is a nice environment for data acquisition but I don't recommend it as a programming language. There are fewer courses that treat numerical python. If you are interested in learning more about python I recommend that you go through the homework on my course. apmonitor.com/che263/index.php/Main/CourseHomework
@souheibbounouara3679
@souheibbounouara3679 3 года назад
please sir i need program which read iwr1642 radar data frame on python
@apm
@apm 3 года назад
Here is a Python program: e2e.ti.com/support/sensors/f/1023/t/762364?AWR1642-Python-program-to-read-and-plot-data-from-XWR1642-and-XWR1443
@souheibbounouara3679
@souheibbounouara3679 3 года назад
i have no hardware to run the program i just want a program which read a data frame from an iwr1642 radar because i have no raspberry and radar github.com/ibaiGorordo/AWR1642-Read-Data-Python-MMWAVE-SDK-2/blob/8a38aa4325b46955703f501bce3f03a56590a737/People%20counting%20demo/peopleCountingDemo.py
@souheibbounouara3679
@souheibbounouara3679 3 года назад
I just have an example dataframe and want to read in python and convert to binaries
@apm
@apm 3 года назад
@@souheibbounouara3679 you could run it on Google Colab if you don't have a place to run it.
@souheibbounouara3679
@souheibbounouara3679 3 года назад
@@apm it works with google colab even if there is no hardware (raspberry and iwr1642)
@Ireemo1
@Ireemo1 6 лет назад
i need a video like this for mac please asap
@apm
@apm 6 лет назад
Python should work the same on all platforms including Windows, MacOS, or Linux. I recommend that you try it and mention anything that is different in the comments.
@mingguangtuo357
@mingguangtuo357 7 лет назад
For the txt saving, how do you add something like so that you start the new time in a different line? Thanks.
@apm
@apm 7 лет назад
+Mingguang Tuo, you can store the data in separate rows. The savetxt function will automatically put it on the next line.
@mingguangtuo357
@mingguangtuo357 7 лет назад
Thanks for your kind reply. For your case here, you are using variable time_col which actually represents a column. I am still confused a little bit how you can process in separate rows. Thanks again.
@Planatification
@Planatification 6 лет назад
Do you by any chance have a video on importing data sets with missing entries? I get the following error: ValueError: Some errors were detected ! Line #41 (got 5 columns instead of 12) I'm trying to use the 1872 Hidalgo stamp data, which is in a txt file with 12 columns but the last row has only 5 entries.
@apm
@apm 6 лет назад
+Muggins, you may want to open the file, read one line at a time, count the number of delimiters (comma or tab are common), and then do a try...except on converting the elements to numbers or leaving as strings. There are lots of examples on stack exchange.
@jeanrodrigues6249
@jeanrodrigues6249 2 года назад
Brasil
@vaibhavagrasen
@vaibhavagrasen 9 лет назад
numpy is not working for 64 bit windows :( please help
@apm
@apm 9 лет назад
vaibhav bhagat Numpy is only 32-bit and requires that you install the 32-bit version of Python. Even though you are running a 64-bit processor, you can still run the 32-bit applications. I recommend uninstalling Python and starting with the 32-bit versions. Also, you'll need Python 2.7. I don't think Numpy works with Python 3.4 yet. For Windows, this is a collection of files that you can download that will work with this example: apmonitor.com/che263/index.php/Main/PythonIntroduction
@masroorahmad26
@masroorahmad26 6 лет назад
how to run custom datasets in python?
@apm
@apm 6 лет назад
There are a few examples here: apmonitor.com/che263/index.php/Main/PythonDataAnalysis
@navtejsinghsaini4945
@navtejsinghsaini4945 8 лет назад
what is the screen recording software you are using?
@apm
@apm 8 лет назад
Camtasia Relay on a Surface Pro Tablet.
@navtejsinghsaini4945
@navtejsinghsaini4945 8 лет назад
thanks :)
@yadd13
@yadd13 8 лет назад
I downloaded numpy... where do I place the files?? my code says "No module named numpy"
@apm
@apm 8 лет назад
Here are instructions on installing numpy: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-FKwicZF7xNE.htmlm16s if you are on Windows. If you are on Linux or MacOS, try "pip install numpy" on a command line.
@yadd13
@yadd13 8 лет назад
+APMonitor.com awesome, nailed it! thank you Sir! :)
@GPCTM
@GPCTM 8 лет назад
WINDOWS: python -m pip install module_name (I don't even know what -m means...)
@apm
@apm 8 лет назад
Thanks for the command line example. When Python is called with -m, the given module (pip) is located on the Python module path and executed as a script.
@piyushbhedurkar2377
@piyushbhedurkar2377 6 лет назад
how do we give extension name .py........i tried but not working
@apm
@apm 6 лет назад
See this video for changing windows file extensions: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-YlN9ax7yC0A.html You may have a file name such as myScript.py.txt and you just need to remove the .txt after you show the file extensions.
@mimrankhan9974
@mimrankhan9974 7 лет назад
would you like to give me this notepad file
@apm
@apm 7 лет назад
+MImran Khan, notepad++ is freely available from notepad-plus-plus.org/ You can download this particular data set from apmonitor.com/che263/index.php/Main/PythonDataAnalysis
@veryblocky
@veryblocky 9 лет назад
When I run this it says, no module name numpy
@javedayoob7529
@javedayoob7529 7 лет назад
George Willcox use this on command prompt pip install numpy
@apm
@apm 7 лет назад
Thanks, Javed! Here is some additional help on installing Numpy for George: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE--llHYUMH9Dg.html
@salahoum9036
@salahoum9036 5 лет назад
can i ask you ?
@apm
@apm 5 лет назад
Sure, it is no problem to ask a question.
@Eskimoz
@Eskimoz 5 лет назад
Impressionnant APMonitor.com
@jeanrodrigues6249
@jeanrodrigues6249 2 года назад
Floppy
Далее
Data Analysis with Python for Excel Users
21:02
Просмотров 289 тыс.
10 CHALLENGE ⚽️ CELINE vs MICHIEL vs BRAM
0:59
Просмотров 2,9 млн
What is Pandas? Why and How to Use Pandas in Python
10:08
Python for Beginners: Reading & Manipulating CSV Files
24:25
Learning Pandas for Data Analysis? Start Here.
22:50
Просмотров 92 тыс.
How I use Python as a Data Analyst
13:56
Просмотров 360 тыс.
Import Data, Analyze, Export and Plot in Python
16:16
Просмотров 171 тыс.
SHAP with Python (Code and Explanations)
15:41
Просмотров 57 тыс.
25 Nooby Pandas Coding Mistakes You Should NEVER make.
11:30
Solving real world data science tasks with Python Pandas!
1:26:07