본문 바로가기

전체 글195

[sql] 설치 없이 연습할 수 있는 싸이트 https://www.w3schools.com/sql/ SQL Tutorial SQL Tutorial SQL is a standard language for storing, manipulating and retrieving data in databases. Our SQL tutorial will teach you how to use SQL in: MySQL, SQL Server, MS Access, Oracle, Sybase, Informix, Postgres, and other database systems. Examples in www.w3schools.com 이곳에서 튜토리얼 진행할 수 있다. https://www.w3schools.com/sql/trysql.asp?filename=trysql_se.. 2019. 3. 28.
[python] 파이썬 xlsx 쓰기, openpyxl 1.쓰기. from openpyxl import Workbookwb = Workbook() sheet1 = wb.active # 엑셀은 최소한 1개이상의 sheet는 존재. 기본적으로 존재하는 sheet을 가져올때 이렇게. sheet1.title = 'Simple1' abc = [1,2,'abc',4,55,3,45,5,2,32,43,3,2,2,3,5,5]for rowindex in range(1,10):sheet1.cell(row=rowindex, column=1).value = rowindexsheet1.cell(row=rowindex, column=2).value = abc[(rowindex-1)] # 이렇게 row와 ,col을 지정해가면서 값을 쓴다. wb.save(filename='test.xls.. 2019. 3. 19.
[pandas] select rows form dataframe based on values in column * select rows form dataframe based on values in columnsql이라면 이런것. select * from table where colume_name = some_value. column value가 scalar 이면 df.loc[df['column_name'] == some_value] some_values가 iternable한 list면 df.loc[df['column_name'].isin(some_values)]여러자기 조건을 걸려면. 각 조건을 ( ) 로 감싸고, & 나 | 을 쓸수 있다. df.loc[(df['column_name'] >= A) & (df['column_name'] 2019. 3. 15.
python double colon :: L = range(100)L(::2)가 의미하는 것은? L(start:endbefore:step)에서 start에서 endbefore까지 step만큼 커지면서 indexing인데 (::2)는 start가 0, endbefore가 list의 마지막 길이를 말하는것. 즉 L(::2)=L(0:100:2). 2019. 3. 15.