科学网

 找回密码
  注册
Python之list下标访问
高琳琳 2019-7-11 11:39
https://blog.csdn.net/qq_18941713/article/details/88683817 https://blog.csdn.net/cassiepython/article/details/76653897
个人分类: Python|2812 次阅读|没有评论
Pydicom基础知识
高琳琳 2019-6-12 10:47
在ubuntu上安装: conda install -c conda -forge pydicom 读取dicom并可视化 import pydicom, os import matplotlib.pyplot as plt path = os.path.join(root, file) im = pydicom.dcmread(path) # type of data is FileDataset px = im.pixel_array &nb ...
个人分类: Python|2385 次阅读|没有评论
在ubuntu上安装: conda install -c conda-forge pydicom 读取dicom并可视
高琳琳 2019-6-10 11:05
在ubuntu上安装: conda install -c conda -forge pydicom 读取dicom并可视化 import pydicom, os import matplotlib.pyplot as plt path = os.path.join(root, file) im = pydicom.dcmread(path) # type of data is FileDataset px = im.pixel_array &nb ...
个人分类: Python|11105 次阅读|没有评论
Python图中中文字体设置
高琳琳 2019-6-3 10:30
在文中画图前添加如下语句: plt.rcParams = #'NSimSun' # 备注: 新宋体:NSimSun 仿宋:FangSong 楷体:KaiTi 仿宋_GB2312 :FangSong_GB2312 楷体_GB2312:KaiTi_GB2312 微软正黑体 :Microsoft JhengHei 微软雅黑体 :Microsoft YaHei 隶书:LiSu 幼圆 ...
个人分类: Python|4429 次阅读|没有评论
[转载]functools.partial() in python
高琳琳 2019-5-16 21:00
functools . partial ( func ) Return a new partial object which when called will behave like func called with the positional arguments args and keyword arguments keywords . For example, partial () can be us ...
个人分类: Python|1319 次阅读|没有评论
[转载]__getitem__ in python
高琳琳 2019-5-15 19:06
1. 首先说一下私有变量 (private variable) a name prefixed with an underscore (e.g. _spam ) should be treated as a non-public part of the API (whether it is a function, a method or a data member). __getitem__ is used to impleme ...
个人分类: Python|1415 次阅读|没有评论
DICOM & its operation with python
高琳琳 2019-5-7 13:20
we define the standard DICOM patient-based coordinate system: x, y and z axes. If Anatomical Orientation Type is absent, the x-axis is increasing to the left hand side of the patient. The y-axis is increasing to the posterior side of the patient. The z-axis is increasing toward the head of the p ...
个人分类: Python|1753 次阅读|没有评论
[转载][Python] 异常try-except-else,try-finally,raise
高琳琳 2019-5-6 19:43
一、try-except-else 使用except而不带任何异常类型 你可以不带任何异常类型使用except,如下实例: try: 正常的操作 ...................... except: 发生异常,执行这块代码 ...................... else: ...
个人分类: Python|2066 次阅读|没有评论
common usage of Pandas
高琳琳 2019-4-5 16:05
read_csv(filepath, usecols) e.g., subnames_no_MPR = pd.read_csv(filepath, delimiter=',', usecols = ); usecols: Return a subset of the columns. If list-like, all elements must either be positional (i.e. integer indices into the document columns) or strings that correspond to col ...
个人分类: Python|1436 次阅读|没有评论
Keyboard shortcuts for the Jupyter Notebook
高琳琳 2019-4-3 17:38
Ctrl+Enter: run the script Alt+Enter: run yourcell block and add a new cell below Scroll up and down your cells with your Up and Down keys
个人分类: Python|1545 次阅读|没有评论

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-25 22:42

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部