Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Atom, Anaconda & Co.
#1
Hello there,
I am a new user and use python for some days. Blush
Last days I installed some programs like python 3.6, atom, anaconda and git bashas as a recommendation from one video tutorial. However, in this video I couldn't find any explanation why do I need all this stuff and how to use this programs with python?
This is all that I could find on myself:
ATOM is some kind of editor for python. But why do we need this editor? I can write a code in python directly, can't I?
Anaconda is useful if I have projects in python 2.7 and 3.6 But how it is useful? What does this program do exactly?
I have no idea what does Git Bashes do? Why do I need this?

I would really appreciate if somebody if you can give me any explanation of the big picture.
Thank you!
Best
Jack
Reply
#2
ATOM is more than an editor, it is an IDE (integrated development environment) and
allows you to do things like work with virtual environments, code completion, syntax checking,
debugging and a lot more/

Anaconda is a version of python that includes most libraries already installed, plus Jupyter Notebook,
Jupyter Lab, orange3 (Component based data mining framework), Qt graphics package. spyder (another IDE),
vscode (yet another IDE), glueviz (data visualization with cross file abilities), rstudio (R languale toolkit), many packages for Mathematics, Science and Engineering and much more.

git bash is like a mini version of Cygwin, and allows use of posix applications for windows, ssh and more.
Reply
#3
Hi!

I assume you are working in windows, if you are using mac or a linux distribution the things are similar (and many times easier)

First I will start with the Atom part. Any python "program" is really just a text file and does not need to be compiled. Atom is just a fancy editor that integrate editing, debugging, project management and control version system in a single interface. But you can use notepad if you prefer. In my case when I am in windows and working with small things I use notepad++.

Second the chaos of anaconda/python. To interpret the text file you need an interpreter Rolleyes. This is the python3.6 program that you download from python.org. The problem is that it has only the standard library, that allows you to do a lot of things, but is limited. To expand the python power (for example, work with matrices) you need to install additional SW like numpy and others.
Install each piece of software and its dependencies one by one can be a nightmare in windows so there are distributions like Anaconda that bundle it for you in a single pack.
About the python 2.7, if you are starting to learn python, go directly with the 3.6. The old version is useful to maintain legacy code and understand old obscure examples but for a beginner is just noise.

About Git bash, is just a version control system (to track the changes in your files) but in windows comes with a nice feature, installs also a terminal emulator that uses bash... that is like the superpowered version of cmd.exe.

So what you need to start is:
- A python interpreter. This can be the python3.6 from python.org or the Anaconda (use the 3.x version)
- A plain text editor. You can use notepad, notepad++...
- A command line program to write "pyhton3.6 my_script.py". In windows you can use the good old cmd.exe, but Bash is nicer.

Notice that if you use an integrated environment (with python you have IDLE, with anaconda spyder, or you can go to pycharm, visual studio, atom...) they usually take care for you of the complete pack of writing+debugging+versioning+running.
Reply
#4
(Apr-29-2018, 07:23 PM)killerrex Wrote: with python you have IDLE, with anaconda spyder
Just as info Spyder do not ship with Anaconda anymore,it now ship with VS Code.

Me general tips:
Basic:
Python 3.6 and pip installation under Windows | Part-2
In part-2 you see cmder it's a lot better choice for daily use than Git bash.
My Anaconda tutorial

Editor:
I would say VS Code(as posted before it also ship with Anaconda) is a better choice that Atom,
they both are multilanguage editors.
VS Code has better support for Python(as they also hired the creator of Python extension),my quick review.
VS Code Goes All In on Python

Very easy editor to use PyScripter, Thonny
All features PyCharm Free Community
Reply
#5
Thank you to all of you!
Reply
#6
I have follow table:
(6 cyl) 409
(4 cyl) 283
(8 cyl) 199
(5 cyl) 48
(12 cyl) 30
(10 cyl) 14
(2 cyl) 2
(16 cyl) 1

I extracted int from the (:, 0) so I have only 6 insist of 6 cyl.
This was my code
df_08['cyl'].str.extract('(\d+)')
And this is my result

0 6
1 4
2 6
3 6
4 6
5 6
6 4
7 4
8 12
9 12
10 12
11 12
12 8
13 8
...

It seems to work. The problem is, when I check the value again with this statement
df_08['cyl'].value_counts()
I have the original result:
(6 cyl) 409
(4 cyl) 283
(8 cyl) 199
(5 cyl) 48
(12 cyl) 30
(10 cyl) 14
(2 cyl) 2
(16 cyl) 1

Why?

Actually, I expected this result:
6 409
4 283
8 199
5 48
12 30
10 14
2 2
16 1
Reply
#7
This question has nothing to do with the original question, please open a new thread or you risk to receive no answers.

Also, you miss to mention that you are using pandas to read and work with your data. It is worth taking a few minutes to think on your question and what information you need to provide to be helped.

Notice that the method Series.str.extract does not modify the original object, return a new data frame, so you need to either use it or update your original dataframe.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020