# -*- coding: utf-8 -*-
"""
Created on Mon May 15 14:13:01 2023

@author: black
"""
import numpy as np
import pandas as pd

titanic = pd.read_csv("C:\\Users\\black\\Desktop\\titanic.csv")
print(titanic)

print(titanic.head(8))
print(titanic.tail(8))

titanic.to_excel('C:\\Users\\black\\Desktop\\test.xlsx', sheet_name='passengers', index=False)
test=pd.read_excel('C:\\Users\\black\\Desktop\\test.xlsx', sheet_name='passengers')
print(test)

print("난수 프레임")
df = pd.DataFrame(np.random.randint(0, 100, size=(5, 4)), columns=list('ABCD'))
print(df)