๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ


๋ถ„๋ฅ˜ ์ „์ฒด๋ณด๊ธฐ

(223)
DATA ๋ฐ์ดํ„ฐ๋ถ„์„๊ธฐ์ˆ ํ‰๊ฐ€ ๋ฐ์ดํ„ฐ๋ถ„์„๊ธฐ์ˆ ํ‰๊ฐ€ DATA DATA ๋“ฑ๊ธ‰ ๋ณ„ ์„ธ๋ถ€ ํ‰๊ฐ€ํ•ญ๋ชฉ Python · 1๊ธ‰ - Python์„ ํ™œ์šฉํ•˜์—ฌ ํ†ต๊ณ„ ๋ฐ ๋จธ์‹ ๋Ÿฌ๋‹ ๋ถ„์„์„ ์ž์œ ์ž์žฌ๋กœ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ๋Š” ์ˆ˜์ค€ · 2๊ธ‰ - Python์„ ํ™œ์šฉํ•˜์—ฌ ๊ฐ„๋‹จํ•œ ๋ฐ์ดํ„ฐ ๋ถ„์„์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ๋Š” ์ˆ˜์ค€ ๊ฒ€์ •๊ณผ๋ชฉ(๋ถ„์•ผ, ์˜์—ญ) ์„ธ๋ถ€ ๋‚ด์šฉ 1๊ธ‰ ์„ธ๋ถ€ ๋‚ด์šฉ 2๊ธ‰ ๋น…๋ฐ์ดํ„ฐ 1. ๋น…๋ฐ์ดํ„ฐ ์ดํ•ด: ๋น…๋ฐ์ดํ„ฐ์˜ ๊ธฐ๋ณธ ๊ฐœ๋…์— ๋Œ€ํ•œ ์ „๋ฐ˜์ ์ธ ์ดํ•ด๋„๋ฅผ ํ‰๊ฐ€ 2. ๋น…๋ฐ์ดํ„ฐ ์ž๋ฃŒ ์ˆ˜์ง‘: ๋น…๋ฐ์ดํ„ฐ ์ž๋ฃŒ ์ˆ˜์ง‘ ๊ธฐ๋ฒ•์— ๋Œ€ํ•œ ์ดํ•ด๋„๋ฅผ ํ‰๊ฐ€ 3. ๋น…๋ฐ์ดํ„ฐ ํ™œ์šฉ: ๋น…๋ฐ์ดํ„ฐ ๋ถ„์„ ์ „๋žต๊ณผ ์ „๋žต์  ์ธ์‚ฌ์ดํŠธ ๋„์ถœ์„ ์œ„ํ•ด ํ•„์š”๋กœ ํ•˜๋Š” ์‚ฌํ•ญ๋“ค์— ๋Œ€ํ•œ ์ดํ•ด๋„๋ฅผ ํ‰๊ฐ€ 4. ๋น…๋ฐ์ดํ„ฐ ์ž๋ฃŒ์˜ ์ €์žฅ ๋ฐ ์ฒ˜๋ฆฌ: ๋น…๋ฐ์ดํ„ฐ์˜ ์ €์žฅ, ์ฒ˜๋ฆฌ ๋ฐ ์ •์ œ ์ ˆ์ฐจ์— ๋Œ€ํ•œ ์ดํ•ด๋„๋ฅผ ํ‰๊ฐ€ 1. ๋น…๋ฐ์ดํ„ฐ ์ดํ•ด: ๋น…๋ฐ์ดํ„ฐ์˜ ๊ธฐ๋ณธ ๊ฐœ๋…์— ๋Œ€ํ•œ..
[Python] Excel, Word ๋‹ค๋ฃจ๊ธฐ Excel openpyxl from openpyxl import Workbook from openpyxl import load_workbook from openpyxl.styles import PatternFill class Copy_excel: def __init__(self, src): self.wb = load_workbook(src) def select_sheet(self, sheet_nm): self.ws = self.wb[sheet_nm] # Write the value in the cell defined by row_dest+column_dest def write_workbook(self, row_dest, column_dest, value): c = self.ws.cell(row = row..
[Python] XlsxWriter - Excel ๋‹ค๋ฃจ๊ธฐ Pandas - Dataframe๊ณผ ํ•จ๊ป˜ ์‚ฌ์šฉํ•˜๊ธฐ writer = pd.ExcelWriter(out_file, engine='xlsxwriter') df.to_excel(writer, sheet_name='Sheet1', freeze_panes = (1, 0), index=False) workbook = writer.book worksheet = writer.sheets['Sheet1'] worksheet.set_zoom(80) # zoom ์„ค์ • # row, col, width, format worksheet.set_column(0, 0, 10, workbook.add_format({'num_format': '#,##0', 'border': 1, 'align': 'center', 'text_wrap': ..
[Python] Pandas - Dataframe ํ•จ์ˆ˜ ๋ชจ์Œ merge result_df = pd.merge(df1, df2, how='left', on='key') result_df = pd.merge(df1, df2, how='left', left_on='name1', right_on='name2') drop column df.drop(columns=['datetime'], inplace=True) reset index df.reset_index(inplace=True, drop=True) new col with apply df['new_col'] = df.apply(lambda x: json.loads(x['loc'])['c'][1], axis=1) sort # ์—ด ์ด๋ฆ„ ์ˆœ์„œ axis=1 # ๋‚ด๋ฆผ์ฐจ์ˆœ ascending=False df.sort_values(b..
๋งค๋ณต์‚ฌ๋ž‘๋‹ˆ ๋ฐœ์น˜ ๋ฐœ์น˜ ์‹œ์ˆ ? ํ•œ์‹œ๊ฐ„ ๋„˜๊ฒŒ ๊ฑธ๋ฆฌ๊ณ  ํ†ต์ฆ์ด ๋ณด๋ฆ„ ์ •๋„ ๊ฐ”๋‹ค ....ใ… 
[Python] sqlalchemy, json์œผ๋กœ ๋ณ€๊ฒฝ ํ›„ ๋ฆฌํ„ด user = User.query df = pd.read_sql(user.statement, user.session.bind) #df = df.drop(columns=['updated_datetime']) df.columns = map(str.lower, df.columns) result_json = json.loads(df.astype(str).to_json(orient='records', double_precision=15, date_format='iso')) result_json = json.dumps(result_json).replace('None', '') result_json = json.loads(result_json)
[Vue] router multiple paths, redirect to default path var router = new VueRouter({ //mode: 'history', routes : [ { path: '/', redirect: '/profile' }, { path: '/order', component: Order }, { path: '/profile', component: Profile, children: [ { path: '', component: ProfileTab1 }, { path: 'tab1', component: ProfileTab1 }, { path: 'tab2', component: ProfileTab2 }, ] }, { path: '*', component: NotFoundComponent } ] }); alias ์‚ฌ์šฉ routes: [ { path: '/foo', ..
[JavasScript] POST ๋ณด๋‚ด๊ธฐ var form = document.createElement("form"); form.setAttribute("method", "post"); form.setAttribute("action", '/comp'); const params = {'uid': uid} //ํžˆ๋“ ์œผ๋กœ ๊ฐ’์„ ์ฃผ์ž…์‹œํ‚จ๋‹ค. for(var key in params) { var hiddenField = document.createElement("input"); hiddenField.setAttribute("type", "hidden"); hiddenField.setAttribute("name", key); hiddenField.setAttribute("value", params[key]); form.appendChild(hiddenField..