Skip to content

Commit a9ce1d6

Browse files
committed
translate
1 parent 7bc4a3c commit a9ce1d6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/atlas/sc_similarity_examples/similarity/example_usage_anndata.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,13 @@ def run_test_case(source_file):
167167
if os.path.exists(excel_path):
168168
excel = pd.ExcelFile(excel_path, engine='openpyxl')
169169
if source_file[:4] in excel.sheet_names:
170-
# 尝试读取指定的分表
170+
# Try to read the specified sheet
171171
existing_df = pd.read_excel(SIMILARITYDIR / f"data/dataset_similarity/{tissue}_similarity.xlsx",
172172
sheet_name=source_file[:4], engine="openpyxl", index_col=0)
173-
# 找出在新数据框中存在但在现有表格中不存在的行
173+
# Find rows that exist in the new dataframe but not in the existing table
174174
merged_df = pd.concat([existing_df, merged_df])
175175
merged_df = merged_df.applymap(lambda x: tuple(x) if isinstance(x, list) else x)
176-
# 2. 然后去重,这时应该使用keep='last'而不是subset参数
176+
# Then deduplicate, using keep='last' instead of subset parameter
177177
merged_df = merged_df[~merged_df.index.duplicated(keep='last')]
178178
# merged_df = merged_df.drop_duplicates(subset=merged_df.index.name, keep='last')
179179
excel.close()

0 commit comments

Comments
 (0)