일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- js
- scRNAseq
- EdgeR
- cellranger
- single cell
- ChIPseq
- CUT&RUN
- PYTHON
- julia
- Batch effect
- single cell analysis
- MACS2
- javascript
- drug muggers
- CUTandRUN
- 싱글셀 분석
- DataFrame
- 비타민 C
- ngs
- python matplotlib
- pandas
- Bioinformatics
- single cell rnaseq
- matplotlib
- github
- scRNAseq analysis
- CSS
- drug development
- Git
- HTML
- Today
- Total
목록pandas (7)
바이오 대표

Pandas groupby( ) groupby( ) 를 이용해서 다음과 같은 기능들을 수행할 수 있다 groupby( ) # object 객체 생성 Aggregation # statistical summary (sum, mean, count) Transformation # group-specific 변형 Grouping by multiple categories Resetting Index with as_index Handling missing values 보다 쉽게 이해하기위해 예시를 이용할 것이고 다음과 같은 Dataframe을 이용할 것이다. groupby( ) object data.groupby( ) 를 이용해서 원하는 column 으로 group 을 묶을 수 있다. 이는 DataFrameGroup..

df.replace(to_repalce =" ", value = " ") 예시)

row 삭제 : df.drop(["row_name1", "row_name2"]) column 삭제: df.drop(["column_name1","column_name2"], axis=1) * axis = 1 만 추가해주면 된다.

Python 을 이용해서 Dataframe 의 특정 rows/ columns 을 뽑아내려고 할때 보통, df.iloc[ ] 이나 df.loc[ ] 을 많이 사용한다. iloc[row, column] : index 이용 # iloc : index location 이라 외움 굿 loc[row, column] : label 이용 예시) .iloc[rows, columns] .loc[rows, columns] # 아래 예시는 .loc[ ] 을 사용하였다. 그래서 data_.loc[0:5, :] 는 row name 이 0~5 이기때문에 index와 다르게 row index 5 도 포함 행/열이 아닌 특정 값을 뽑아내고 싶다면 원하는 행(..