I am trying every day to knock 100 Python practical data analysis that is selling well these days. This time, I will share the lessons I learned from the simple to the necessary ones. (Updated from time to time)
This book contains 100 practical examples. (Book link (Amazon))
As a future trend ** "Python is much simpler than VBA, and you can create materials much faster!" ** I think that ** business people who can combine Excel and Python ** will be popular in the company.
As a remark, ** the machine learning book of Shuwa System is lighter, more practical, cheaper and recommended ** than the O'Reilly book (I also buy the O'Reilly book when I have money).
I will introduce some examples with samples that you can copy and paste with Jupyter immediately. (It's a little different from the contents of the book. I can't introduce everything. The cost performance is outstanding, so please buy it.)
(2019/12/21) @konandoiruasa pointed out that the CSV of the code cannot be read from the URL. If that happens, do the following: Thank you @konandoiruasa.
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
Read the data simply.
import pandas as pd
customer_data= pd.read_csv('https://microlearning.site/pydata/ch1/customer_master.csv')
customer_data.head()
Read various data
import pandas as pd
transaction_1 = pd.read_csv('https://microlearning.site/pydata/ch1/transaction_1.csv')
transaction_1.head()
import pandas as pd
transaction_2 = pd.read_csv('https://microlearning.site/pydata/ch1/transaction_1.csv')
transaction_2.head()
transaction = pd.concat([transaction_1,transaction_2],ignore_index=True)
transaction.head()
Comparing the lengths, I think that ** transaction ** is the total number of columns of ** transaction_1 ** and ** transaction_2 **.
print(len(transaction_1))
print(len(transaction_2)
print(len(transaction))
--2019/12/21 Newly created
Recommended Posts