1. 기존파일 읽기 1 2 3 file_name = "example" print(file_name) read_excel = pd.read_csv(file_name) cs 2. 기존파일 셀 읽기 1 2 3 name1 = read_excel.iloc[j, 9] name2 = read_excel.iloc[j, 8] name3 = read_excel.iloc[j,10] cs 3. 새로운 파일 만들기 1 2 3 4 5 new_excel=pd.DataFrame(columns=['EventNumber','Station','Magnitude']) new_excel.loc[j]=[Event_number,Station,Magnitude] new_file_name="data.csv" new_excel.to_csv(new_f..
1. np.array 1 2 3 4 5 6 7 8 9 10 import numpy as np import array array_np = np.array([[2,3],[4,5]]) print("array_np",array_np) """ [[2 3] [4 5]] """ Colored by Color Scripter cs 2. np.arange 1 2 3 4 import numpy as np mylist=np.arange(4,9,1) print(mylist) #[4 5 6 7 8] cs 3. np.zeros 1 2 3 4 5 import numpy as np x = np.zeros(500) print(x) cs 4. np.concatenate 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1..
1. 기본 list 생성 1 2 x_data = [] y_data = [] cs 2. list to array 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 import numpy as np A = [100,200] B = [50,0] C = [350,100] expression_data = [A,B,C] array2d = np.array(expression_data) print(array2d) """ [[100 200] [ 50 0] [350 100]] """ array = np.array(A) print("A type", type(A)) #A type print(array2d.shape) #(3, 2) print(type(array2d)) # print(a..