Author: datapandasadmin

|

Python List Comprehension Dictionary Set Comprehension and For Loops

This is a guide on Python List comprehension. List comprehension is a great way to write simple and easy to read Python codes. You can use it dictionaries and sets as well.   Credits to  Corey Schafer , creator of Python course materials. lets create a list In [115]: num = range(10) num   Out[115]: [0, 1,…

Python Pandas Groupby function agg Series GroupbyObject

Python Pandas Groupby function agg Series GroupbyObject

Group By FunctionThis is a quick look at Python groupby function. Very powerful and useful function. We will take a simple look at it here. Credits to Data School , creator of Python course materials. lets import sample dataset In [18]: import pandas as pd   In [19]: drinks = pd.read_csv(‘http://bit.ly/drinksbycountry’)   In [20]: #lets check the head…

Python iloc, loc, ix Data Retrieving Selection Functions
|

Python iloc, loc, ix Data Retrieving Selection Functions

  Pandas iloc, loc, and ix functions are very powerful ways to quickly select data from your dataframe. Today , we take a quick look at these 3 functions. Credits to Data School, you can check him out in Youtube  In [1]: import pandas as pd   In [2]: #lets get this public dataset and play with it…

Natural Language Processing Machine Learning Algorithm Model Python – NLP
| |

Natural Language Processing Machine Learning Algorithm Model Python – NLP

In this guide, we take a look at Natural Language Processing, NLP in Python. Natural Language is a very extensive topic and very powerful machine learning algorithm you can build. This is very useful in many areas of most industries. Credits to Jose Portilla, creator of Learning Python for Data Analysis and Visualization course   on Udemy  …

|

Create Batch Dot Bat File to Run Your Python Script With Windows Scheduler

After writing your script, you might want to schedule it to run periodically, let’s say, Daily, Weekly or Any Time interval you will decide Before you schedule that you want to  simply create a batch file and schedule it run with a Windows Scheduler. Here are simple steps to do that. First of all, if…

Getting Python Spyder Anaconda IDE To Work Using Virtualenv

If you have some Python scripts which rely on some packages that need a different version other than the version your Python Spyder uses, you can simply use Python Virtualenv to run Spyder IDE . This will save you a lot of headache and you can simply continue with your development projects. This tutorial will…

Simple Python Logging Callling Reload to Help Save Logging to File

Simple Python Logging Callling Reload to Help Save Logging to File

  In this notes, we are looking at a simple but yet useful and powerful logging in Python In [77]: import logging #levels of logging are #1 debug – detailed info #2 info – confirmation that things went according to plan #3 warning – something unexpected happened #4 error – some function failed #5 critical -…

Getting Stock Prices from Yahoo and plotting Python 3 Matplolib Urllib

This is  some quick notes about getting stock data from Yahoo and plotting it using Matplotlib . The Python version used is Python 3.5 Credits to sentdex.  You can check him out on Youtube. In [11]: import matplotlib.pyplot as plt import numpy as np import urllib import matplotlib.dates as mdate import urllib.request %matplotlib inline #%matplotlib qt #%matplotlib notebook…

Matplotlib Pyplot Plt Python Pandas Data Visualization Plotting

Matplotlib Pyplot Plt Python Pandas Data Visualization Plotting

  This is some quick notes about graphing or plotting graphs with Matplotlib in Python. Credits to sentdex.  You can check him out on Youtube. import matplotlib.pyplot as plt %matplotlib inline # simple syntax is matplotlib plots as plt.plot(x, y) plt.plot([1,2,3], [5,6,7]) plt.show()   In [4]: # plotting with variables and basic labelling of our plot x = [1,2,3]…