Data Category Archives - General Assembly Blog

How to Run a Python Script

By

As a blooming Python developer who has just written some Python code, you’re immediately faced with the important question, “how do I run it?” Before answering that question, let’s back up a little to cover one of the fundamental elements of Python.

An Interpreted Language

Python is an interpreted programming language, meaning Python code must be run using the Python interpreter.

Traditional programming languages like C/C++ are compiled, meaning that before it can be run, the human-readable code is passed into a compiler (special program) to generate machine code – a series of bytes providing specific instructions to specific types of processors. However, Python is different. Since it’s an interpreted programming language, each line of human-readable code is passed to an interpreter that converts it to machine code at run time.

So to run Python code, all you have to do is point the interpreter at your code.

Different Versions of the Python Interpreter

It’s critical to point out that there are different versions of the Python interpreter. The major versions you’ll likely see are Python 2 and Python 3, but there are sub-versions (i.e. Python 2.7, Python 3.5, Python 3.7, etc.). Sometimes these differences are subtle. Sometimes they’re dramatically different. It’s important to always know which version is compatible with your Python code.

Run a script using the Python interpreter

To run a script, we have to point the Python interpreter at our Python code…but how do we do that? There are a few different ways, and there are some differences between how Windows and Linux/Mac do things. For these examples, we’re assuming that both Python 2.7 and Python 3.5 are installed.

Our Test Script

For our examples, we’re going to start by using this simple script called test.py.

test.py
print(“Aw yeah!”)'

How to Run a Python Script on Windows

The py Command

The default Python interpreter is referenced on Windows using the command py. Using the Command Prompt, you can use the -V option to print out the version.

Command Prompt
> py -V
Python 3.5

You can also specify the version of Python you’d like to run. For Windows, you can just provide an option like -2.7 to run version 2.7.

Command Prompt
> py -2.7 -V
Python 2.7

On Windows, the .py extension is registered to run a file with that extension using the Python interpreter. However, the version of the default Python interpreter isn’t always consistent, so it’s best to always run your scripts as explicitly as possible.

To run a script, use the py command to specify the Python interpreter followed by the name of the script you want to run with the interpreter. To avoid using the full path to your script (i.e. X:\General Assembly\test.py), make sure your Command Prompt is in the same directory as your script. For example, to run our script test.py, run the following command:

Command Prompt
> py -3.5 test.py
Aw yeah!

Using a Batch File

If you don’t want to have to remember which version to use every time you run your Python program, you can also create a batch file to specify the command. For instance, create a batch file called test.bat with the contents:

test.bat
@echo off
py -3.5 test.py

This file simply runs your py command with the desired options. It includes an optional line “@echo off” that prevents the py command from being echoed to the screen when it’s run. If you find the echo helpful, just remove that line.

Now, if you want to run your Python program test.py, all you have to do is run this batch file.

Command Prompt
> test.bat
Aw yeah!

How to Run a Python Script on Linux/Mac

The py Command

Linux/Mac references the Python interpreter using the command python. Similar to the Windows py command, you can print out the version using the -V option.

Terminal
$ python -V
Python 2.7

For Linux/Mac, specifying the version of Python is a bit more complicated than Windows because the python commands are typically a bunch of symbolic links (symlinks) or shortcuts to other commands. Typically, python is a symlink to the command python2, python2 is a symlink to a command like python2.7, and python3 is a symlink to a command like python3.5. One way to view the different python commands available to you is using the following command:

Terminal
$ ls -1 $(which python)* | egrep ‘python($|[0-9])’ | egrep -v config
/usr/bin/python
/usr/bin/python2
/usr/bin/python2.7
/usr/bin/python3
/usr/bin/python3.5

To run our script, you can use the Python interpreter command and point it to the script.

Terminal
$ python3.5 test.py
Aw yeah!

However, there’s a better way of doing this.

Using a shebang

First, we’re going to modify the script so it has an additional line at the top starting with ‘#!’ and known as a shebang (shebangs, shebangs…).

test.py
#!/usr/bin/env python3.5
print(“Aw yeah!”)

This special shebang line tells the computer how to interpret the contents of the file. If you executed the file test.py without that line, it would look for special instruction bytes and be confused when all it finds is text. With that line, the computer knows that it should run the contents of the file as Python code using the Python interpreter.

You could also replace that line with the full path to the interpreter:

#!/usr/bin/python3.5

However, different versions of Linux might install the Python interpreter in different locations, so this method can cause problems. For maximum portability, I always use the line with /usr/bin/env that looks for the python3.5 command by searching the PATH environment variable, but the choice is up to you.

Next, we’re going to set the permissions of this file to be executable with this command:

Terminal
$ chmod +x test.py

Now we can run the program using the command ./test.py!

Terminal
$ ./test.py
Aw yeah!

Pretty sweet, eh?

Run the Python Interpreter Interactively

One of the awesome things about Python is that you can run the interpreter in an interactive mode. Instead of using your py or python command pointing to a file, run it by itself, and you’ll get something that looks like this:

Command Prompt
> py
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

Now you get an interactive command prompt where you can type in individual lines of Python!

Command Prompt (Python Interpreter)
>>> print(“Aw yeah!”)
Aw yeah!

What’s great about using the interpreter in interactive mode is that you can test out individual lines of Python code without writing an entire program. It also remembers what you’ve done, just like in a script, so things like functions and variables work the exact same way.

Command Prompt (Python Interpreter)
>>> x = "Still got it."
>>> print(x)
Still got it.

How to Run a Python Script from a Text Editor

Depending on your workflow, you may prefer to run your Python program directly from your text editor. Different text editors provide fancy ways of doing the same thing we’ve already done — pointing the Python interpreter at your Python code. To help you along, I’ve provided instructions on how to do this in four popular text editors.

  1. Notepad++
  2. VSCode
  3. Sublime Text
  4. Vim

1. Notepad++

Notepad++ is my favorite general purpose text editor to use on Windows. It’s also super easy to run a Python program from it.

Step 1: Press F5 to open up the Run… dialogue

Step 2: Enter the py command like you would on the command line, but instead of entering the name of your script, use the variable FULL_CURRENT_PATH like so:

py -3.5 -i "$(FULL_CURRENT_PATH)"

You’ll notice that I’ve also included a -i option to our py command to “inspect interactively after running the script”. All that means is it leaves the command prompt open after it’s finished, so instead of printing “Aw yeah!” and then immediately quitting, you get to see the Python program’s output.

Step 3: Click Run

2. VSCode

VSCode is a Windows text editor designed specifically to work with code, and I’ve recently become a big fan of it. Running a Python program from VSCode is a bit complicated to set it up, but once you’ve done that, it works quite nicely.

Step 1: Go to the Extensions section by clicking this symbol or pressing CTRL+SHIFT+X.

Step 2: Search and install the extensions named Python and Code Runner, then restart VSCode.

Step 3: Right click in the text area and click the Run Code option or press CTRL+ALT+N to run the code.

Note: Depending on how you installed Python, you might run into an error here that says ‘python’ is not recognized as an internal or external command. By default, Python only installs the py command, but VSCode is quite intent on using the python command which is not currently in your PATH. Don’t worry, we can easily fix that.

Step 3.1: Locate your Python installation binary or download another copy from www.python.org/downloads. Run it, then select Modify.

Step 3.2: Click next without modifying anything until you get to the Advanced Options, then check the box next to Add Python to environment variables. Then click Install, and let it do its thing.

Step 3.3: Go back to VSCode and try again. Hopefully, it should now look a bit more like this:

3. Sublime Text

Sublime Text is a popular text editor to use on Mac, and setting it up to run a Python program is super simple.

Step 1: In the menu, go to Tools → Build System and select Python.

Step 2: Press command +b or in the menu, go to Tools → Build.

4. Vim

Vim is my text editor of choice when it comes to developing on Linux/Mac, and it can also be used to easily run a Python program.

Step 1: Enter the command :w !python3 and hit enter.

Step 2: Profit.

Now that you can successfully run your Python code, you’re well on your way to speaking parseltongue!

– – – – –

Explore Our Upcoming Coding Programs

3 Major Uses for Python Programming

By

Python is a popular and versatile programming language. But what is Python used for? If you’re interested in learning Python or are in the process of learning how to code in Python, your efforts will be greatly rewarded as there’s so much you can do with it. In this article, we’ll explore the top three major uses for Python.

Before we dive into the uses, let’s briefly discuss why Python has so many uses in the first place. What characteristics does Python have that allow it to be so useful? Python is:

  • General-purpose: The language was designed to be “general purpose”, meaning it doesn’t have language constructs to force it into a specific application domain. Other programming languages that are general-purpose include (but are not limited to): C++, Go, Java, JavaScript, and Ruby. 
  • Readable: Python is a high-level programming language, meaning it has a higher level of abstraction from machine language and has a simple syntax and semantics (e.g., indentation instead of curly brackets to indicate blocks), which lends to its readability. 
  • Versatile: Python has a large standard library, meaning it comes equipped with a lot of specialized code to handle different tasks. For example, instead of writing your own Python code to read and write CSV files, you can use the csv module’s reader and writer objects. In addition, there are many open-source libraries and frameworks that provide additional value for Python programmers — especially those in machine learning, deep learning, application development, and game development — and scientific computing will find an ample supply of libraries and modules.

What is Python used for? There are so many different tasks that Python can accomplish. You can use it to build recommender systems, create cool charts and graphs, build restful APIs, program robots, conduct scientific computing, manipulate text data or extract text from images; the list goes on and on. 

The best way to think about uses for Python is through the most active and popular disciplines that rely on Python programming:

  1. Artificial intelligence and machine learning
  2. Data analysis and data visualization
  3. Web development

1. Artificial Intelligence and Machine Learning

What it is: Artificial Intelligence is a concept that’s more or less the idea of machines or computers that mimic human cognitive functions such as “learning” and “problem-solving.” Activities like driving a car, playing chess, and answering a question are all structured, logic-based things that humans can do that are being implemented by computers today. At the heart of this activity is machine learning, which is the process that a computer takes to learn the relationships between variables in data so well that it can predict future outcomes (usually on unseen data). If data is the input (“knowledge”), the machines understand the relationships between variables (“learning”) and it can predict what the next step is (“outcome”) — then you have machine learning. 

How Python is used: Artificial intelligence requires a lot of data, which in turn requires appropriate storage, pre-processing, and data modeling techniques to be implemented. Deep learning is the intermediary component; it’s the use of specialized models (neural networks) that can handle “big data” at scale. Python is a programming language of choice for the machine learning, deep learning, and artificial intelligence community due to it being a minimalistic and intuitive language with a significant number of libraries dedicated to machine learning activities, which reduces the time required to implement and get results. R is another popular language used by machine learning enthusiasts and practitioners, but Python tends to be more popular because of the number of machine learning and AI-related efforts coming from the tech community, which uses Python. For example, TensorFlow is Google’s AI platform and open-source software library used for machine learning and the creation of neural networks for AI purposes.

Helpful links: Machine Learning, Python Libraries for Machine Learning

2. Data Analysis and Data Visualization

What it is: Data analysis is the specialized practice of analyzing data, both big and small, for information and insights. Results of data analyses are often visualized, for the benefit of the recipient, and the tools and techniques used to communicate results visually requires the specialization that is known as data visualization. Data analysis and data visualization are not unique to any industry. It’s better to think of them as process-focused roles than industry-specific roles. After all, every company and industry has its own data to work with. What data analysis is not is the management of data from servers and storage, although some data analysts specialize in data management.  

How Python is used: Data analysis and data visualization are specialized roles that can implement Python in ways that are integral to the mission of each role. A data analyst will use Python for data wrangling and data transformation, which is converting data from its raw format to a usable, analyzable format. Then, using open-sourced libraries like Pandas, NumPy, and SciPy, data analysts can manipulate and analyze both numerical and categorical data. In order to visualize data locally, additional libraries such as Seaborn, matplotlib, ggplot, and bokeh, can be used. Some data visualization professionals prefer using Python over business intelligence platforms like PowerBI and Tableau because it’s free, easy to learn, and reduces the need to have to use additional software to create visualizations. 

Helpful links: Data Analysis in Python, Python Libraries for Data Visualization

3. Web Development 

What it is: Web development is a catch-all term for creating web applications and application programming interfaces (APIs) for the web. Web development is a highly specialized role that can be explained by the design pattern known as model, view, and controller (MVC). These terms represent the specialized layers of code of a web application or API. The model involves the code for an application’s dynamic data structure, the view involves the code that directly interacts with the user, and the controller is the code that handles user interactions and works to facilitate input going from the view to the model.

How Python is used: Python has several MVC frameworks that can be used for web application development straight out of the box, and this includes Django, turbogears, and web2py. While a web framework is not required for web development, it’s beneficial to use them as they greatly speed up the development progress. For beginners, learning Python’s syntax and the libraries needed for building a web application or API is a high level of effort, but the alternative would involve a much greater effort, as it would require the knowledge and correct use of multiple programming languages instead of Python.

Helpful links: Full Stack Python: Web Development, Web Frameworks for Python

Conclusion

We’ve explored the major uses for Python, which include machine learning and artificial intelligence, data analysis and data visualization, and web development. If you’re currently learning Python programming, then you’re off to a good start, especially if you’re considering pursuing work in any of the aforementioned areas. For those unsure how to start learning Python, I encourage you to read some of our other posts, which provide more details and tips on how to get started.

Explore Our Upcoming Coding Programs

Beginner’s Python Cheat Sheet

By

Data Science is rapidly becoming a vital discipline for all types of businesses. An ability to extract insight and meaning from a large pile of data is a skill set worth its weight in gold. Due to its versatility and ease of use, Python has become the programming language of choice for data scientists.

In this Python cheat sheet, we will walk you through a couple of examples using two of the most used data types: the list and the Pandas DataFrame. The list is self-explanatory; it’s a collection of values set in a one-dimensional array. A Pandas DataFrame is just like a tabular spreadsheet, it has data laid out in columns and rows.

Let’s take a look at a few neat things we can do with lists and DataFrames in Python!
Get the pdf here.

Python Cheat Sheet

Lists

Creating Lists

Create an empty list and use a for loop to append new values.

#add two to each value
my_list = []
for x in range(1,11):
my_list.append(x+2)

We can also do this in one step using list comprehensions:

my_list = [x + 2 for x in range(1,11)]

Creating Lists with Conditionals

As above, we will create a list, but now we will only add 2 to the value if it is even.

#add two, but only if x is even
my_list = []
for x in range(1,11):
if x % 2 == 0:
my_list.append(x+2)
else:
my_list.append(x)

Using a list comp:

my_list = [x+2 if x % 2 == 0 else x \
for x in range(1,11)]

Selecting Elements and Basic Stats

Select elements by index.

#get the first/last element
first_ele = my_list[0]
last_ele = my_list[-1]

Some basic stats on lists:

#get max/min/mean value
biggest_val = max(my_list)
smallest_val = min(my_list)avg_val = sum(my_list) / len(my_list)

DataFrames

Reading in Data to a DataFrame

We first need to import the pandas module.

import pandas as pd

Then we can read in data from csv or xlsx files:

df_from_csv = pd.read_csv(‘path/to/my_file.csv’,
sep=’,’,
nrows=10)
xlsx = pd.ExcelFile(‘path/to/excel_file.xlsx’)
df_from_xlsx = pd.read_excel(xlsx, ‘Sheet1’)

Slicing DataFrames

We can slice our DataFrame using conditionals.

df_filter = df[df[‘population’] > 1000000]
df_france = df[df[‘country’] == ‘France’]

Sorting values by a column:

df.sort_values(by=’population’,
ascending=False)

Filling Missing Values

Let’s fill in any missing values with that column’s average value.

df[‘population’] = df[‘population’].fillna(
value=df[‘population’].mean()
)

Applying Functions to Columns

Apply a custom function to every value in one of the DataFrame’s columns.

def fix_zipcode(x):
”’
make sure that zipcodes all have leading zeros
”’
return str(x).zfill(5)
df[‘clean_zip’] = df[‘zip code’].apply(fix_zipcode)

Explore Our Python Course

What is Python: A Beginner’s Guide

By

WHAT IS PYTHON?: AN INTRODUCTION

Python is one of the most popular and user-friendly programming languages out there. As a developer who’s learned a number of programming languages, Python is one of my favorites due to its simplicity and power. Whether I’m rapidly prototyping a new idea or developing a robust piece of software to run in production, Python is usually my language of choice.

The Python programming language is ideal for folks first learning to program. It abstracts away many of the more complicated elements of computer programming that can trip up beginners, and this simplicity gets you up and running much more quickly!

For instance, the classic “Hello world” program (it just prints out the words “Hello World!”) looks like this in C:

However, to understand everything that’s going on, you need to understand what #include means (am I excluding anyone?), how to declare a function, why there’s an “f” appended to the word “print,” etc., etc.

In Python, the same program looks like this:

Not only is this an easier starting point, but as the complexity of your Python programming grows, this simplicity will make sure you’re spending more time writing awesome code and less time tracking down bugs! 

Since Python is popular and open source, there’s a thriving community of Python developers online with extensive forums and documentation for whenever you need help. No matter what your issue is, the answer is usually only a quick Google search away.

If you’re new to programming or just looking to add another language to your arsenal, I would highly encourage you to join our community.

What is Python?

Named after the classic British comedy troupe Monty Python, Python is a general-purpose, interpreted, object-oriented, high-level programming language with dynamic semantics. That’s a bit of a mouthful, so let’s break it down.

General-Purpose

Python is a general-purpose language which means it can be used for a wide variety of development tasks. Unlike a domain-specific language that can only be used for specific types of applications (think JavaScript and HTML/CSS for web development), a general-purpose language like Python can be used for:

Web applications – Popular frameworks like Django and Flask are written in Python.

Desktop applications – The Dropbox client is written in Python.

Scientific and numeric computing – Python is the top choice for data science and machine learning.

Cybersecurity – Python is excellent for data analysis, writing system scripts that interact with an operating system, and communicating over network sockets.

Interpreted

Python is an interpreted language, meaning Python code must be run using the Python interpreter.

Traditional programming languages like C/C++ are compiled, meaning that before it can be run, the human-readable code is passed into a compiler (special program) to generate machine code — a series of bytes providing specific instructions to specific types of processors. However, Python is different. Since it’s an interpreted programming language, each line of human-readable code is passed to an interpreter that converts it to machine code at run time.

In other words, instead of having to go through the sometimes complicated and lengthy process of compiling your code before running it, you just point the Python interpreter at your code, and you’re off!

Part of what makes an interpreted language great is how portable it is. Compiled languages must be compiled for the specific type of computer they’re run on (i.e. think your phone vs. your laptop). For Python, as long as you’ve installed the interpreter for your computer, the exact same code will run almost anywhere!

Object-Oriented

Python is an Object-Oriented Programming (OOP) language which means that all of its elements are broken down into things called objects. Objects are very useful for software architecture and often make it simpler to write large, complicated applications. 

High-Level

Python is a high-level language which really just means that it’s simpler and more intuitive for a human to use. Low-level languages such as C/C++ require a much more detailed understanding of how a computer works. With a high-level language, many of these details are abstracted away to make your life easier.

For instance, say you have a list of three numbers — 1, 2, and 3 — and you want to append the number 4 to that list. In C, you have to worry about how the computer uses memory, understands different types of variables (i.e. an integer vs. a string), and keeps track of what you’re doing.

Implementing this in C code is rather complicated:

However, implementing this in Python code is much simpler:

Since a list in Python is an object, you don’t need to specifically define what the data structure looks like or explain to the computer what it means to append the number 4. You just say “list.append(4)”, and you’re good.

Under the hood, the computer is still doing all of those complicated things, but as a developer, you don’t have to worry about them! Not only does that make your code easier to read, understand, and debug, but it means you can develop more complicated programs much faster.

Dynamic Semantics

Python uses dynamic semantics, meaning that its variables are dynamic objects. Essentially, it’s just another aspect of Python being a high-level programming language.

In the list example above, a low-level language like C requires you to statically define the type of a variable. So if you define an integer x, set x = 3, and then set x = “pants”, the computer will get very confused. However, if you use Python to set x = 3, Python knows x is an integer. If you then set x = “pants”, Python knows that x is now a string.

In other words, Python lets you assign variables in a way that makes more sense to you than it does to the computer. It’s just another way that Python programming is intuitive.

It also gives you the ability to do something like create a list where different elements have different types like the list [1, 2, “three”, “four”]. Defining that in a language like C would be a nightmare, but in Python, that’s all there is to it.

It’s Popular. Like, Super Popular.

Being so powerful, flexible, and user-friendly, the Python language has become incredibly popular. This popularity is important for a few reasons.

Python Programming is in Demand

If you’re looking for a new skill to help you land your next job, learning Python is a great move. Because of its versatility, Python is used by many top tech companies. Netflix, Uber, Pinterest, Instagram, and Spotify all build their applications using Python. It’s also a favorite programming language of folks in data science and machine learning, so if you’re interested in going into those fields, learning Python is a good first step. With all of the folks using Python, it’s a programming language that will still be just as relevant years from now.

Dedicated Community

Python developers have tons of support online. It’s open source with extensive documentation, and there are tons of articles and forum posts dedicated to it. As a professional developer, I rely on this community everyday to get my code up and running as quickly and easily as possible.

There are also numerous Python libraries readily available online! If you ever need more functionality, someone on the internet has likely already written a library to do just that. All you have to do is download it, write the line “import <library>”, and off you go. Part of Python’s popularity in data science and machine learning is the widespread use of its libraries such as NumPy, Pandas, SciPy, and TensorFlow.

Conclusion

Python is a great way to start programming and a great tool for experienced developers. It’s powerful, user-friendly, and enables you to spend more time writing badass code and less time debugging it. With all of the libraries available, it will do almost anything you want it to.

Final answer to the question “What is Python”? Awesome. Python is awesome.

8 Tips for Learning Python Fast

By

It’s possible to learn Python fast. How fast depends on what you’d like to accomplish with it, and how much time you can allocate to study and practice Python on a regular basis. Before we dive in further, I’d like to establish some assumptions I’ve made about you and your reasons for reading this article:

  • You have little to no prior experience learning Python. 
  • You want to know how long it’s going to take to learn Python.
  • You’re interested in resources and strategies for learning Python.

First, I’ll address how quickly you should be able to learn Python. If you’re interested in learning the fundamentals of Python programming, it could take you as little as two weeks to learn, with routine practice. If you’re interested in mastering Python in order to complete complex tasks or projects, or to spur a career change, it’s going to take much longer. In this article, I’ll provide tips and resources geared toward helping you gain Python programming knowledge in a short timeframe.

If you’re wondering how much it’s going to cost to learn Python, the answer there is also, “it depends”. There is a large selection of free resources available online, not to mention the various books, courses, and platforms that have been published for beginners. More on that in a moment.

Another question you might have is, “how hard is it going to be to learn Python?” That also depends. If you have any experience programming in another language such as R, Java, or C++, it’ll probably be easier to learn Python fast than someone who hasn’t programmed before. But learning a programming language like Python is similar to learning a natural language, and everyone’s done that before. You’ll start by memorizing basic vocabulary and learning the rules of the language. Over time, you’ll add new words to your repertoire and test out new ways to use them. Learning Python is no different.

By now you’re thinking, “OK, this is great. I can learn Python fast, cheap, and easily. Just tell me what to read and point me on my way.” Not so fast. There’s a fourth thing you need to consider, and that’s how to learn Python. Research on learning has identified that not all people learn the same way. Some learn best by reading, while others learn best by seeing and hearing. Some people enjoy learning through games rather than courses or lectures. As you review the curated list of resources below, consider your own learning preferences as you evaluate options.

Now let’s dig in. Below are my eight tips to help you learn Python fast.

1. Cover the following Python fundamentals.

At a bare minimum, you (and your resource) must cover the fundamentals. Without understanding them, you’ll have a hard time working through complex problems, projects or use cases. Examples of Python fundamentals include:

  • Variables and Types
  • Lists, Dictionaries, and Sets
  • Basic Operators
  • String Formatting
  • Basic String Operations
  • Conditions
  • Loops
  • Functions
  • List Comprehensions
  • Classes and Objects

If you’re really pressed for time, all of these fundamentals can be quickly explored on a number of different websites: docs.python.org, RealPython.org, stavros.io, developers.google.com, pythonforbeginners.org. See the section below on “Websites” for more details.

2. Establish a goal for your study.

Before you start learning Python, establish a goal for your study. The challenges you face as you start learning will be easier to overcome when you keep your goal in mind. Additionally, you’ll know what learning material to focus on or skim through as it pertains to your goals. For example, if you’re interested in learning Python for data analysis, you’re going to want to complete exercises, write functions, and learn Python libraries that facilitate data analysis. The following are typical examples of goals for Python that might pertain to you:

  • Data analysis
  • Data science and machine learning
  • Mobile apps
  • Website development
  • Work automation

3. Select a resource (or resources) for learning Python fast.

Python resources can be grouped into three main categories: interactive resources, non-interactive resources, and video resources. In-person courses are also an option, but won’t be covered in this post.

Interactive resources have become common in recent years through the popularization of interactive online courses that provide practical coding challenges and explanations. If it feels like you’re coding, that’s because you actually are. Interactive resources are typically available for free or a nominal fee, or you can sign up for a free trial before you buy. 

Non-interactive resources are your most traditional and time-tested; they’re books (digital and paperback) and websites (“online tutorials”). Many first-time Python learners prefer them due to the familiar and convenient nature of these mediums. As you’ll see, there are many non-interactive resources for you to choose from, and most are free.

Video resources were popularized over the past 10 years by MOOCs (massive online open courses) and resembled university lectures captured on video. In fact, they were often supported or promoted by leading universities. Now, there’s an abundance of video resources for various subjects, including programming in Python. Some of these video resources are pre-recorded courses hosted on learning platforms, and others are live-streamed courses provided by online education providers. General Assembly produces a live course in Python that covers Python fundamentals in one week

Below I’ve compiled a list of resources to help you get a jumpstart on learning Python fast. They fall into the categories laid out above, and at a bare minimum they cover Python basics. Throughout the list, I’ve indicated with an asterisk (*) which resources are free, to the best of my knowledge.

Interactive Resources: Tools and Lessons

  • CodeAcademy: One the more popular online interactive platforms for learning Python fast. I know many Python programmers, myself included, who have taken CodeAcademy’s Python fundamentals course. It’s great for beginners, and you can knock it out in a week. It will get you excited about programming in Python. 
  • DataCamp: Short expert videos with immediate hands-on-keyboard exercises. It’s on-par with the CodeAcademy courses. 
  • *PythonTutor.com: A tool that helps you write and visualize code step by step. I recommend pairing this tool with another learning resource. This tool makes learning Python fundamentals a lot easier because you can visualize what your code is doing. 

Non-Interactive Resources

Non-interactive resources fall into two sub-categories: books and websites.

Books

In researching books, I noticed a majority of them were actually catered to existing programmers interested in learning Python, or experienced Python programmers looking for reliable reference material (“cookbooks”) or specialized literature. Below, I’ve listed only the books I think are helpful for beginners.

  • Introducing Python, 2nd Edition: This book mixes tutorials with cookbook-style code recipes to explain fundamental concepts in Python 3.
  • Learn Python 3 The Hard Way: 52 well-developed exercises for beginners to learn Python. 
  • Python Basics: A Practical Introduction to Python 3: The website says it all — this book is designed to take you from “beginner to intermediate.” 
  • Python Crash Course, 2nd Edition: This book provides a foundation in general programming concepts, Python fundamentals, and problem solving through real-world projects.

Websites

At first, my list started off with over 20 examples of websites covering Python fundamentals. Instead of sharing them all, I decided to only include ones that had a clear advantage in terms of convenience or curriculum. All of these resources are free.

  • *Google’s Python Class: Tutorials, videos, and programming exercises in Python for beginners, from a Python-friendly company. 
  • *Hitchhiker’s Guide to Python: This guide helps you learn and improve your Python code and also teaches you how to set up your coding environment. The site search is incredibly effective at helping you find what you need. I can’t recommend this site enough. 
  • *Python for Everybody: An online book that provides Python learning instruction for those interested in solving data analysis problems. Available in PDF format in Spanish, Italian, Portuguese, and Chinese. 
  • *Python For You and Me: An online book that covers beginner and advanced topics in Python, in addition to introducing a popular Python framework for web applications.
  • *Python.org: The official Python documentation. The site also provides a beginner’s guide, a Python glossary, setup guides, and how-tos.
  • *Programiz in Python: Programiz has a lengthy tutorial on Python fundamentals that’s really well done. It shouldn’t be free, but it is.
  • *RealPython.com: A large collection of specialized Python tutorials, most come with video demonstrations. 
  • *Sololearn: 92 chapters and 275 related quizzes and several projects covering Python fundamentals that can also be accessed through a mobile app.
  • *Tutorialspoint.com: A no-frills tutorial covering Python basics. 
  • *W3Schools for Python: Another no-nonsense tutorial from a respected web-developer resource. 

Video Resources

Video resources have become increasingly popular, and with good reason: they’re convenient. Why read a textbook or tutorial when you can cover the same material in video format on your computer or mobile device? They fall into two sub-categories, pre-recorded video-courses, and live video courses.

Pre-Recorded Courses

  • Coursera: A large catalog of popular courses in Python for all levels. Most courses can be taken free, and paid courses come with certifications. You can also view courses on their mobile app.
  • EdX: Hosts university courses that focus on specific use cases for Python (data science, game development, AI) but also cover programming basics. EdX also has a mobile app.
  • Pluralsight: A catalog of videos covering Python fundamentals, as well as specialized topics like machine learning in Python.
  • RealyPython.com: A collection of pre-recorded videos on Python fundamentals for beginners.
  • *TreeHouse: A library of videos of Python basics and intermediate material.
  • EvantoTutsPlus: 7.6 hours of pre-recorded videos on Python fundamentals, plus some intermediate content.  
  • *Udacity: Provides a 5-week course on Python basics. Also covers popular modules in the Python Standard Library and other third-party libraries. 
  • Udemy: A library of popular Python courses for learners of all levels. It’s hard to single out a specific course. I recommend previewing multiple beginner Python courses until you find the one you like most. You can also view courses on their mobile app.

Live Courses

  • General Assembly: This live online course from General Assembly takes all of the guesswork out of learning Python. With General Assembly, you have a curated and comprehensive Python curriculum, a live instructor and TA, and a network of peers and alumni you can connect with during and after the course.

4. Consider learning a Python library.

In addition to learning Python, it’s beneficial to learn one or two Python libraries. Libraries are collections of specialized functions that serve as “accelerators.” Without them, you’d have to write your own code to complete specialized tasks. For example, Pandas is a very popular library for manipulating tabular data. Numpy helps in performing mathematical and logical operations on arrays. Covering libraries would require another post — for now, review this Python.org page on standard Python libraries, and this GitHub page on additional libraries.

5. Speed up the Python installation process with Anaconda.

You can go through the trouble of downloading the Python installer from the Python Software Foundation website, and then sourcing and downloading additional libraries, or you can download the Anaconda installer, which already comes with many of the packages you’ll routinely use, especially if you plan on using Python for data analysis or data science

6. Select and install an IDE.

You’ll want to install an integrated development environment (IDE), which is an application that lets you script, test, and run code in Python. 

When it comes to IDEs, the right one is the one that you enjoy using the most. According to various sources, the most popular Python IDEs/text editors are PyCharm, Spyder, Jupyter Notebook, Visual Studio, Atom, and Sublime. First, the good news: they’re all free, so try out a couple before you settle on one. Next, the “bad” news: each IDE/text editor has a slightly different user interface and set of features, so it will take a bit of time to learn how to use each one.

For Python first-timers, I recommend coding in Jupyter Notebook. It has a simple design and a streamlined set of capabilities that won’t distract and will make it easy to practice and prototype in Python. It also comes with a dedicated display for dataframes and plots. If you download Anaconda, Jupyter Notebook comes pre-installed. Over time, I encourage you to try other IDEs that are better suited for development (Pycharm) or data science (Rodeo) and allow integrations (Sublime). 

Additionally, consider installing an error-handler or autocompleter to complement your IDE, especially if you end up working on lengthy projects. It will point out mistakes and help you write code quicker. Kite is a good option, plus it’s free and integrates with most IDEs.

7. When in doubt, use Google to troubleshoot code.

As you work on Python exercises, examples, and projects, one of the simplest ways to troubleshoot errors will be to learn from other Python developers. Just run a quick internet search and include keywords about your error. For example, “how to combine two lists in Python” or “Python how to convert to datetime” are perfectly acceptable searches to run, and will lead you to a few popular community-based forums such as StackOverFlow, Stack Exchange, Quora, Programiz, and GeeksforGeeks.

8. Schedule your Python learning and stick to it.

This is the part that most people skip, which results in setbacks or delays. Now, all you have left is to set up a schedule. I recommend that you establish a two-week schedule at a minimum to space out your studying and ensure you give yourself enough time to adequately review the Python fundamentals, practice coding in your IDE, and troubleshooting code. Part of the challenge (and fun) of learning Python or any programming language is troubleshooting errors. After your first two weeks, you’ll be amazed at how far you’ve come, and you’ll have enough practice under your belt to continue learning the more advanced material provided by your chosen resource. 

Concluding thoughts

By this point, we’ve established a minimum learning timeline, you know to select a goal for your study, you have a list of learning resources to choose from, and you know what other coding considerations you’ll need to make. We hope you make the most of these tips to accelerate your Python learning!

Explore Our Upcoming Coding Programs

Three Big Reasons Why You Should Learn Python

By

As a data scientist, my work is contingent on knowing and using Python. What I like about Python, and why I rely on it so much, is that it’s simple to read and understand, and it’s versatile. From cleaning, querying, and analyzing data, to developing models and visualizing results, I conduct all these activities using Python. 

I also teach data science in Python. My students learn Python to build machine learning models but I’m always excited to hear of the other ways they’ve leveraged the programming language. One of my students told me they used it to web-scrape online basketball statistics just so they could analyze the data to win an argument with friends. Another student decided to expand on her knowledge of Python by learning Django, a popular framework, which she uses to build web apps for small businesses. 

Before taking the plunge into data science, we all had fundamental questions (and concerns) about learning Python. If this sounds like you, don’t worry. Before I started learning Python, I spent several months convincing myself to start. Now that I’ve learned, my only regret was not starting sooner.

If you’re interested in learning Python, I want to share my biggest reasons for why you should. Two of these reasons are inherent to Python; one of them is a benefit of Python that I experienced first-hand, and some of the examples I discuss come from things I have researched. My goal is to give you enough information to help make an educated decision about learning Python, and I really hope that you choose to learn.

1. Python is easy to learn. 

Long before I learned Python, I struggled to learn another object-oriented programming language in high school: Java. From that experience, I realized that there’s a difference between learning to program, and learning a programming language. I felt like I was learning to program, but what made Java difficult to learn was how verbose it was: the syntax was difficult for me to memorize, and it requires a lot of code to be able to do anything.

Comparatively, Python was much easier to learn and is much simpler to code. Python is known as a readable programming language; its syntax was designed to be interpretable and concise, and has inspired many other coding languages. This bodes well for first-timers and those who are new to programming. And, since it typically requires fewer lines of code to perform the same operation in Python than in other languages, it’s much faster to write and complete scripts. In the long run, this saves developers time, which can then be used to further improve their Python. 

One observation I’ve made of Python is that it’s always improving. There have been noticeably more updates to the language in the last 5-10 years than in prior decades, and the updates have often been significant. For example, later versions of Python 3 typically benchmark faster completion times on common tasks than when carried out in Python 2. Every release in Python 3 has come with more built-in functions, meaning “base” Python is becoming more and more capable and versatile.

Learning is not an individual process; often you will end up learning a lot from “peers.” According to various sources, Python has one of the largest and most active online communities of learners and practitioners. It’s the most popular programming language to learn; it’s one of the most popular programming languages for current developers; and among data scientists, it’s the second most common language known and used. All of this translates into thousands of online posts, articles (like this one!), and resources to help you learn.

Speaking of online learning, Python is also tremendously convenient to learn. To learn the fundamentals of Python, there are a lot of learning tools out there — books, online tutorials, videos, bootcamps — I’ve tried them all. They each have their merits but ultimately having options makes it easier to learn. Once you start learning, the resources don’t stop. There are dozens of really good tutorials, code visualizers, infographics, podcasts, and even apps. With all of these resources at your disposal, there’s really no reason why you can’t learn!

2. Python is versatile.

Python’s popularity is also tied to its usability and versatility. According to O’Reilly, the technology and business training company, the most common use cases for python are data science, data analysis, and software engineering. Other use cases for Python include statistical computing, data visualization, web development, machine learning, deep learning, artificial intelligence, web scraping, data engineering, game and mobile app development, process automation, and IoT. 

To get into any of these use cases would require another post. Regardless, you might be wondering what allows Python to be such a versatile programming language? A lot of it has to do with the various frameworks and libraries that have been built for Python. 

Libraries are collections of functions and methods (reusable and executable code) with specific intents; and frameworks more or less are collections of libraries. If you ask any Python developer, they can name at least a half-dozen libraries they use. For example, I often use NumPy, Pandas, and Scikit-learn — the holy trinity for data scientists — to perform math and scientific operations, manipulate and analyze data, and build and train models, respectively. Many Python-based web developers will name Django as one of their preferred frameworks for building web applications.  

While it’s true that libraries are written for most programming languages and not just Python, Python’s usability, readability, and popularity encourage the development of more libraries, which in turn makes Python even more popular and user-friendly for existing developers and newcomers. When you learn Python, you won’t just be learning base Python, you’ll be learning to use at least a library or two.

3. Python developers are in demand.

Many people learn to program to enhance their current capability; others to change their careers. I started off as one of the former but became the latter. Before data science, I built digital ad campaigns and a lot of my work was automatable. My only problem was that I didn’t know how to code. Although I eventually learned how, in the process of learning Python for my work, I was presented with different job opportunities where I could use Python, and learned about different companies who were looking for people experienced in Python. And so I made a switch.

There are a lot of Python-related roles in prominent industries. According to ActiveState, the industries with the most need for Python are insurance, retail banking, aerospace, finance, business services, hardware, healthcare, consulting services, info-tech (think: Google), and software development. From my own experience, I would add media, marketing, and advertising to that list.

Why so many? As these industries modernized, companies within them have been collecting and using data at an increasing rate. Their data needs have become more varied and sophisticated, and in turn, their need for people capable of managing, analyzing, and operationalizing data has increased. In the future, there will be very few roles that won’t be engaged in data, which is why learning Python now is more important than ever — it’s one way to bullet-proof your career and your job prospects.

A lot of top tech companies value Python programmers. For instance, to say that Google “uses” Python is an understatement. Among Google engineers, It’s a commonly used language for development and research, and Google’s even released their own Python style guide. Google engineers have developed several libraries for the benefit of the Python community including Tensorflow, a popular open-source machine learning library. YouTube uses Python to administer video, access data, and in various other ways. Python’s creator Guido van Rossum, a Dutch programmer, was hired by Google to improve their QA protocols. And most importantly, the organization continues to recruit and hire more people skilled in Python. Other notable tech companies who frequently hire for Python talent include Dropbox, Quora, Mozilla, Hewlett-Packard, Qualcomm, IBM, and Cisco. 

Lastly, with demand often comes reward. Companies looking to hire people skilled in Python often pay top dollar or the promise of increased salary potential. 

Conclusion

In summary, there are lots of reasons to learn Python. It’s easy to learn, there are many ways to learn it, and once you do, there’s a lot you can do with it. From my experience, Python programming is a rewarding skill that can benefit you in your current role, and will certainly benefit you in future ones. Even if Python doesn’t end up being the last programming language you learn, it should certainly be your first.

Explore Our Python Course

How Long Does it Take to Learn Python

By

Python, an essential programming language, has taken the programming world by storm. Much of this attention has followed from the interest in machine learning and AI. Python has become the default programming language of Data Scientists and Machine Learning Engineers all over the world. Python’s versatility has also gained a loyal following amongst diverse fields like Bioinformatics, Astronomy, Gaming, and of course, Data Science.

But utility alone doesn’t explain why so many developers love using Python. From its humble beginnings in 1991, Python was designed by Guido van Rossum to be a programming language that emphasized code readability. Or in Guido’s words, “Computer Programming for Everybody.” This ease of human interpretability pairs with an open source ethos that makes it available to developers everywhere for free! So with a few short lines of code you can import packages and libraries that professional developers from companies like Facebook, Google, or AirBnB have spent thousands of hours building _(for free)_.

It’s low-entry cost and ease of reading programs has rightfully garnered Python an immense and passionate following.

1. Where there is talent, there is an opportunity, especially, in Python programming.

Python has rapidly become a deep learning skill that is in high demand within the job market. Jobs sites like Dice and Glassdoor have seen near-exponential growth in postings looking for candidates with Python skills over the last few years because making pivot tables and wrangling data in spreadsheets is no longer enough to get you noticed for data analyst positions. As the variety, velocity, and volume of data has exploded, developers have had to scale their analysis pipelines to match — this means that the people pouring over those numbers must develop a deeper skill set to deal with the enormous amounts of data piling up in their databases.

2. Speed and flexibility are the names of the game!

Python is ideal for handling the heavy-lifting required for today’s computationally intense data analyses used by most businesses today.

OK, so now that you’re sold on its value, how long does it take to learn Python? Like any language, practice and muscle memory are the name of the programming language game. The more time you can immerse yourself, the quicker you will see gains.

It also depends on how much you intend to learn. You can have a simple “Hello World” program running in a matter of minutes, i.e., _Seriously; it is only one line of code!_, etc. To get an understanding of deep learning, a subset of machine learning, or data scientist techniques may take months of focused study, but to get your foot in the door as a Data Analyst, it takes about 40-50 hours of studying and practicing — in my experience.

Some of the rudimentary skills from loading required packages, the underlying data structures, and some simple data manipulation take some effort to put into practice. Remember that learning anything takes motivation and attention. With our focus being pulled in many directions at once, sometimes having some guided learning can be a huge help — especially with data analysis and data analysts.

How often have you had a problem you spent hours trying to solve by Googling every corner of the internet, only to have the solution explained to you in three seconds by an expert? You can have industry professionals help guide you through this exciting learning adventure to help make sure you are spending your effort in the right places rather than sift through all the YouTube videos, blogs, or StackOverflow posts.

3. General Assembly Python programming FTW!

Often you get back what you put in. So if you are thinking about getting started on your programming language journey of learning Python, General Assembly has several great ways to get you started.

Free Introduction to Python workshops are held regularly. The aim here is to get you set up to start learning and developing in a couple of hours.

There is a 10-week part-time Python course that give you all the programming language skills you need to start a new career as a Data Analyst or Python Developer for those that are ready for more structured and in-depth learning. These classes are held for two hours, twice a week, over 10 weeks.

For those who like to jump in and learn as much as possible in concentrated, full-time sessions every day, General Assembly offers a 13-week Data Science Immersive as well, which covers all the essentials of putting Python programming into good use for Machine Learning and Data Science.

4. Dive into Python programming + a Python course.

If you are on the fence about learning the programming language Python, I strongly suggest you dive in and don’t look back! I have found the transition from being a Data Analyst in a cancer research lab to becoming a Data Scientist at an InsureTech company, one of the best experiences of my life. All the nerdy things I loved, i.e.,  _(computers, stats, data visualization)_, all banded together in an amazing career path. 

How long does it take to learn Python? The answer is up to YOU. 

Are you ready to start your next chapter?

Explore Our Upcoming Coding Programs

Harnessing the Power of Data for Disaster Relief

By

2455_header

Data is the engine driving today’s digital world. From major companies to government agencies to nonprofits, business leaders are hunting for talent that can help them collect, sort, and analyze vast amounts of data — including geodata — to tackle the world’s biggest challenges.

In the case of emergency management, disaster preparedness, response, and recovery, this means using data to expertly identify, manage, and mitigate the risks of destructive hurricanes, intense droughts, raging wildfires, and other severe weather and climate events. And the pressure to make smarter data-driven investments in disaster response planning and education isn’t going away anytime soon — since 1980, the U.S. has suffered 246 weather and climate disasters that topped over $1 billion in losses according to the National Centers for Environmental Information.

Employing creative approaches for tackling these pressing issues is a big reason why New Light Technologies (NLT), a leading company in the geospatial data science space, joined forces with General Assembly’s (GA) Data Science Immersive (DSI) course, a hands-on intensive program that fosters job-ready data scientists. Global Lead Data Science Instructor at GA, Matt Brems, and Chief Scientist and Senior Consultant at NLT, Ran Goldblatt, recognized a unique opportunity to test drive collaboration between DSI students and NLT’s consulting work for the Federal Emergency Management Agency (FEMA) and the World Bank.

The goal for DSI students: build data solutions that address real-world emergency preparedness and disaster response problems using leading data science tools and programming languages that drive visual, statistical, and data analyses. The partnership has so far produced three successful cohorts with nearly 60 groups of students across campuses in Atlanta, Austin, Boston, Chicago, Denver, New York City, San Francisco, Los Angeles, Seattle, and Washington, D.C., who learn and work together through GA’s Connected Classroom experience.

Taking on Big Problems With Smart Data

nlt-ga-2

DSI students present at NLT’s Washington, D.C. office.

“GA is a pioneering institution for data science, so many of its goals coincide with ours. It’s what also made this partnership a unique fit. When real-world problems are brought to an educational setting with students who are energized and eager to solve concrete problems, smart ideas emerge,” says Goldblatt.

Over the past decade, NLT has supported the ongoing operation, management, and modernization of information systems infrastructure for FEMA, providing the agency with support for disaster response planning and decision-making. The World Bank, another NLT client, faces similar obstacles in its efforts to provide funding for emergency prevention and preparedness.

These large-scale issues served as the basis for the problem statements NLT presented to DSI students, who were challenged to use their newfound skills — from developing data algorithms and analytical workflows to employing visualization and reporting tools — to deliver meaningful, real-time insights that FEMA, the World Bank, and similar organizations could deploy to help communities impacted by disasters. Working in groups, students dived into problems that focused on a wide range of scenarios, including:

  • Using tools such as Google Street View to retrieve pre-disaster photos of structures, allowing emergency responders to easily compare pre- and post-disaster aerial views of damaged properties.
  • Optimizing evacuation routes for search and rescue missions using real-time traffic information.
  • Creating damage estimates by pulling property values from real estate websites like Zillow.
  • Extracting drone data to estimate the quality of building rooftops in Saint Lucia.

“It’s clear these students are really dedicated and eager to leverage what they learned to create solutions that can help people. With DSI, they don’t just walk away with an academic paper or fancy presentation. They’re able to demonstrate they’ve developed an application that, with additional development, could possibly become operational,” says Goldblatt.

Students who participated in the engagements received the opportunity to present their work — using their knowledge in artificial intelligence and machine learning to solve important, tangible problems — to an audience that included high-ranking officials from FEMA, the World Bank, and the United States Agency for International Development (USAID). The students’ projects, which are open source, are also publicly available to organizations looking to adapt, scale, and implement these applications for geospatial and disaster response operations.

“In the span of nine weeks, our students grew from learning basic Python to being able to address specific problems in the realm of emergency preparedness and disaster response,” says Brems. “Their ability to apply what they learned so quickly speaks to how well-qualified GA students and graduates are.”

Here’s a closer look at some of those projects, the lessons learned, and students’ reflections on how GA’s collaboration with NLT impacted their DSI experience.

Leveraging Social Media to Map Disasters

2455_sec1_socialmediamap_560x344

The NLT engagements feature student work that uses social media to identify “hot spots” for disaster relief.

During disasters, one of the biggest challenges for disaster relief organizations is not only mapping and alerting users about the severity of disasters but also pinpointing hot spots where people require assistance. While responders employ satellite and aerial imagery, ground surveys, and other hazard data to assess and identify affected areas, communities on the ground often turn to social media platforms to broadcast distress calls and share status updates.

Cameron Bronstein, a former botany and ecology major from New York, worked with group members to build a model that analyzes and classifies social media posts to determine where people need assistance during and after natural disasters. The group collected tweets related to Hurricane Harvey of 2017 and Hurricane Michael of 2018, which inflicted billions of dollars of damage in the Caribbean and Southern U.S., as test cases for their proof-of-concept model.

“Since our group lacked premium access to social media APIs, we sourced previously collected and labeled text-based data,” says Bronstein. “This involved analyzing and classifying several years of text language — including data sets that contained tweets, and transcribed phone calls and voice messages from disaster relief organizations.”

Contemplating on what he enjoyed most while working on the NLT engagement, Bronstein states, “Though this project was ambitious and open to interpretation, overall, it was a good experience and introduction to the type of consulting work I could end up doing in the future.”

Quantifying the Economic Impact of Natural Disasters

2455_sec2_economicimpact_560x344

Students use interactive data visualization tools to compile and display their findings.

Prior to enrolling in General Assembly’s DSI course in Washington D.C., Ashley White learned early in her career as a management consultant how to use data to analyze and assess difficult client problems. “What was central to all of my experiences was utilizing the power of data to make informed strategic decisions,” states White.

It was White’s interest in using data for social impact that led her to enroll in DSI where she could be exposed to real-world applications of data science principles and best practices. Her DSI group’s task: developing a model for quantifying the economic impact of natural disasters on the labor market. The group selected Houston, Texas as its test case for defining and identifying reliable data sources to measure the economic impact of natural disasters such as Hurricane Harvey.

As they tackled their problem statement, the group focused on NLT’s intended goal, while effectively breaking their workflow into smaller, more manageable pieces. “As we worked through the data, we discovered it was hard to identify meaningful long-term trends. As scholarly research shows, most cities are pretty resilient post-disaster, and the labor market bounces back quickly as the city recovers,” says White.

The team compiled their results using the analytics and data visualization tool Tableau, incorporating compelling visuals and story taglines into a streamlined, dynamic interface. For version control, White and her group used GitHub to manage and store their findings, and share recommendations on how NLT could use the group’s methodology to scale their analysis for other geographic locations. In addition to the group’s key findings on employment fluctuations post-disaster, the team concluded that while natural disasters are growing in severity, aggregate trends around unemployment and similar data are becoming less predictable.

Cultivating Data Science Talent in Future Engagements

Due to the success of the partnership’s three engagements, GA and NLT have taken steps to formalize future iterations of their collaboration with each new DSI cohort. Additionally, mutually beneficial partnerships with leading organizations such as NLT present a unique opportunity to uncover innovative approaches for managing and understanding the numerous ways data science can support technological systems and platforms. It’s also granted aspiring data scientists real-world experience and visibility with key decision-makers who are at the forefront of emergency and disaster management.

“This is only the beginning of a more comprehensive collaboration with General Assembly,” states Goldblatt. “By leveraging GA’s innovative data science curriculum and developing training programs for capacity building that can be adopted by NLT clients, we hope to provide students with essential skills that prepare them for the emerging, yet competitive, geospatial data job market. Moreover, students get the opportunity to better understand how theory, data, and algorithms translate to actual tools, as well as create solutions that can potentially save lives.”

***

New Light Technologies, Inc. (NLT) provides comprehensive information technology solutions for clients in government, commercial, and non-profit sectors. NLT specializes in DevOps enterprise-scale systems integration, development, management, and staffing and offers a unique range of capabilities from Infrastructure Modernization and Cloud Computing to Big Data Analytics, Geospatial Information Systems, and the Development of Software and Web-based Visualization Platforms.

In today’s rapidly evolving technological world, successfully developing and deploying digital geospatial software technologies and integrating disparate data across large complex enterprises with diverse user requirements is a challenge. Our innovative solutions for real-time integrated analytics lead the way in developing highly scalable virtualized geospatial microservices solutions. Visit our website to find out more and contact us at https://NewLightTechnologies.com.

Essential Data Skills to Know

By

In 2012, IBM revealed that 2.5 quintillion bytes of data were being created per day — an enormous sum that humankind had never known before. Since then, the volume of the world’s data has not only continued to increase, but it’s arriving at a faster and faster pace.

However, data by itself doesn’t have much value. After all, a pile of numbers and data files is just that: a pile of numbers and data files. The real value of data comes from making sense of the abundance of information. That’s why businesses and organizations across countless industries are investing in forward-thinking data talent — to leverage its predictive power, craft smart business strategies, and drive informed decision-making.

The sharp and strategic people who do this job are data scientistsdata analystsmachine learning engineers, and business intelligence analysts — among other titles — and these professionals are in high demand. In 2018, the jobs platform Glassdoor ranked data scientist as the Best Job in America for the third year in a row, with a median salary of $110,000 and more than 4,500 available positions. Additionally, five other data- and analytics-related roles made the list of the top 50 jobs, ranked by number of openings in the field, salary, and overall job satisfaction.

Companies are quickly recognizing the vital need for data knowledge, impacting a vast array of industries including eCommerce, health care, finance, and sales — to name a few. In order to stay competitive and grow their businesses, leaders are investing in their future by strategically training and hiring talent to ensure proficiency in key skills.

Three of the most prevalent technologies transforming how we understand and use data are SQL, Python, and machine learning — and all are great entry points into the field. The first two are programming languages used to gather, organize, and make sense of data. The last is a specific field in which data scientists and machine learning engineers, using Python and other technologies, enable computers to learn how to make predictions without needing to program every potential scenario.

What You Can Do With Essential Data Skills

You can get started with SQLPython, and machine learning, three of the most useful data tools, without any formal background. However, each topic has a different set of fundamentals that you’ll need to understand as you progress in your learning. For example, Python will expose you to the world of object-oriented programming, while SQL will expose you to database design concepts. Machine learning will require a good understanding of data analysis.

Dipping your toes in this uncharted water may seem daunting — but it shouldn’t! There’s so much opportunity in the data field for growth, whether or not you’re seeking a full-time role. No matter your position or industry, this knowledge can take your hireability to the next level. Here are just some of the things you can do with data expertise:

  • Become a skilled problem-solver. Programming languages like SQL and Python teach you problem-solving skills that are applicable in many business scenarios you’ll encounter.
  • Be more cross-functional. Having key programming and data skills under your belt makes it easier to work with teams across your organization. Being able to speak the same language as software engineers, business intelligence analysts, and data professionals helps streamline requests, bring clarity to the workflow, and provide insight into technical action items.
  • Build the technology of the future. Data skills enable you to help build new, groundbreaking technologies, including web applications, machine learning models, chatbots, and much more.
  • Expand your career potential. Based on previous projections from the management consultancy firm McKinsey & Company, IBM predicts that by 2020, the number of data science and analytics job listings will grow by nearly 364,000 to about 2.72 million.
  • Improve communication. Data professionals must communicate to non-technical audiences — including stakeholders across the company — in a compelling way to highlight business impact and opportunity. At the end of the day, those stakeholders have to act on and possibly make far-reaching decisions based on data findings.

Want to learn more? In our paper A Beginner’s Guide to SQL, Python, and Machine Learning, we break down these three essential technologies. The skills go beyond data to bring delight, efficiency, and innovation to countless industries. They empower people to drive businesses forward with a speed and precision previously unknown, and now’s a great time to dive in.

Download the paper to learn more.

Boost your business and career acumen with data.

Find out why machine learning, Python, and SQL are the top technologies to know.

Download the eBook

A Machine Learning Guide for Beginners

By

Ever wonder how apps, websites, and machines seem to be able to predict the future? Like how Amazon knows what your next purchase may be, or how self-driving cars can safely navigate a complex traffic situation?

The answer lies in machine learning.

Machine learning is a branch of artificial intelligence (AI) that often leverages Python to build systems that can learn from and make decisions based on data. Instead of explicitly programming the machine to solve the problem, we show it how it was solved in the past and the machine learns the key steps that are required to do the same task on its own.

Machine learning is revolutionizing every industry by bringing greater value to companies’ years of saved data. Leveraging machine learning enables organizations to make more precise decisions instead of following intuition.

There’s an explosive amount of innovation around machine learning that’s being used within organizations, especially given that the technology is still in its early days. Many companies have invested heavily in building recommendation and personalization engines for their customers. But, machine learning is also being applied in a huge variety of back-office use cases as well, like to forecast sales, identify production bottlenecks, build efficient traffic routing systems, and more.

Machine learning algorithms fall into two categories: supervised and unsupervised learning.

Supervised Learning

Supervised learning tries to predict a future value by relying on training from past data. For instance, Netflix’s movie-recommendation engine is most likely supervised. It uses a user’s past movie ratings to train the model, then predicts what their rating would likely be for movies they haven’t seen and recommends the ones that score highly.

Supervised learning enjoys more commercial success than unsupervised learning. Some common use cases include fraud detection, image recognition, credit scoring, product recommendation, and malfunction prediction.

Unsupervised Learning

Unsupervised learning is about uncovering hidden structures within data sets. It’s helpful in identifying segments or groups, especially when there is no prior information available about them. These algorithms are commonly used in market segmentation. They enable marketers to identify target segments in order to maximize revenue, create anomaly detection systems to identify suspicious user behavior, and more.

For instance, Netflix may know how many customers it has, but wants to understand what kind of groupings they fall into in order to offer services targeted to them. The streaming service may have 50 or more different customer types, aka, segments, but its data team doesn’t know this yet. If the company knows that most of its customers are in the “families with children” segment, it can invest in building specific programs to meet those customer needs. But, without that information, Netflix’s data experts can’t create a supervised machine learning system.

So, they build an unsupervised machine learning algorithm instead, which identifies and extracts various customer segments within the data and allows them to identify groups such as “families with children” or “working professionals.”

How Python, SQL, and Machine Learning Work Together

To understand how SQLPython, and machine learning relate to one another, let’s think of them as a factory. As a concept, a factory can produce anything if it has the right tools. More often than not, the tools used in factories are pretty similar (e.g., hammers and screwdrivers).

What’s amazing is that there can be factories that use those same tools but produce completely different products (e.g., tables versus chairs). The difference between these factories is not the tools, but rather how the factory workers use their expertise to leverage these tools and produce a different result.

In this case, our goal would be to produce a machine learning model, and our tools would be SQL and Python. We can use SQL to extract data from a database and Python to shape the data and perform the analyses that ultimately produce a machine learning model. Your knowledge of machine learning will ultimately enable you to achieve your goal.

To round out the analogy, an app developer, with no understanding of machine learning, might choose to use SQL and Python to build a web app. Again, the tools are the same, but the practitioner uses their expertise to apply them in a different way.

Machine Learning at Work

A wide variety of roles can benefit from machine learning know-how. Here are just a few:

  • Data scientist or analyst: Data scientists or analysts use machine learning to answer specific business questions for key stakeholders. They might help their company’s user experience (UX) team determine which website features most heavily drive sales.
  • Machine learning engineer: A machine learning engineer is a software engineer specifically responsible for writing code that leverages machine learning models. For example, they might build a recommendation engine that suggests products to customers.
  • Research scientist: A machine learning research scientist develops new technologies like computer vision for self-driving cars or advancements in neural networks. Their findings enable data professionals to deliver new insights and capabilities.

Machine Learning in Everyday Life: Real-World Examples

While machine learning-powered innovations like voice-activated robots seem ultra-futuristic, the technology behind them is actually widely used today. Here are some great examples of how machine learning impacts your daily life:

  • Recommendation engines: Think about how Spotify makes music recommendations. The recommendation engine peeks at the songs and albums you’ve listened to in the past, as well as tracks listened to by users with similar tastes. It then starts to learn the factors that influence your music preferences and stores them in a database, recommending similar music that you haven’t listened to — all without writing any explicit rules!
  • Voice-recognition technology: We’ve seen the emergence of voice assistants like Amazon’s Alexa and Google’s Assistant. These interactive systems are based entirely on voice-recognition technology powered by machine learning models.
  • Risk mitigation and fraud prevention: Insurers and creditors use machine learning to make accurate predictions on fraudulent claims based on previous consumer behavior, rather than relying on traditional analysis or human judgement. They also can use these analyses to identify high-risk customers. Both of these analyses help companies process requests and claims more quickly and at a lower cost.
  • Photo identification via computer vision: Machine learning is common among photo-heavy services like Facebook and the home-improvement site Houzz. Each of these services use computer vision — an aspect of machine learning — to automatically tag objects in photos without human intervention. For Facebook, these tend to be faces, whereas Houzz seeks to identify individual objects and link to a place where users can purchase them.

Why You and Your Business Need to Understand Data Science

As the world becomes increasingly data-driven, learning to leverage key technologies like machine learning — along with the programming languages Python (which helps power machine learning algorithms) and SQL — will create endless possibilities for your career and your organization. There are many pathways into this growing field, as detailed by our Data Science Standards Board, and now’s a great time to dive in.

In our paper A Beginner’s Guide to SQL, Python, and Machine Learning, we break down these three data sectors. These skills go beyond data to bring delight, efficiency, and innovation to countless industries. They empower people to drive businesses forward with a speed and precision previously unknown.

Individuals can use data know-how to improve their problem-solving skills, become more cross-functional, build innovative technology, and more. For companies, leveraging these technologies means smarter use of data. This can lead to greater efficiency, employees who are empowered to use data in innovative ways, and business decisions that drive revenue and success.

Download the paper to learn more.

Boost your business and career acumen with data.
Find out why machine learning, Python, and SQL are the top technologies to know.

Download the eBook