Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/data_collector/cn_index/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import re
import abc
import sys
from io import BytesIO
from io import BytesIO, StringIO
from typing import List, Iterable
from pathlib import Path

Expand Down Expand Up @@ -182,7 +182,7 @@ def _parse_excel(self, excel_url: str, add_date: pd.Timestamp, remove_date: pd.T
def _parse_table(self, content: str, add_date: pd.DataFrame, remove_date: pd.DataFrame) -> pd.DataFrame:
df = pd.DataFrame()
_tmp_count = 0
for _df in pd.read_html(content):
for _df in pd.read_html(StringIO(content)):
if _df.shape[-1] != 4 or _df.isnull().loc(0)[0][0]:
continue
_tmp_count += 1
Expand Down