본문 바로가기

Programming/python36

VScode에 jupyter notebook, ipython 사용하기 https://code.visualstudio.com/docs/python/jupyter-support Working with Jupyter Notebooks in Visual Studio Code Working with Jupyter Notebooks in Visual Studio Code code.visualstudio.com 파이썬 고르기 Python: Select Interpreter command from the Command Palette (Ctrl+Shift+P). Connect to a remote Jupyter server You can offload intensive computation in a Jupyter notebook to other computers by connecting .. 2019. 5. 16.
[python] python, 32bit, 64bit 확인 >>> import platform >>> print(platform.architecture()) 2019. 4. 1.
[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.