--Summary of how to read data acquired by CSV for analysis in Python and hold it in Pandas Datafarame type.
--Prepare the CSV file you want to analyze in the current directory --CSV file is premised on molding
import csv, os
import pandas as pd
import numpy as np
#Specify the path string of the target file
file_path = os.path.join(".","maerge_Machine11_trd.csv")
print("file name:" + file_path)
#Convert from CSV file to df
df = pd.read_csv(file_path)
#Display of read data
df.head()
#TODO:Getting the desired data from df
#TODO:Statistical analysis and visualization
--Specify the file location with os.path.join () without depending on the environment --Open the file with pd.read_csv () and convert it to dataframe type ――After this, you can get the necessary rows and columns from df and perform statistical analysis and visualization.
Recommended Posts