f967bd87424bbc50f475d5959994a5743ae2af0e,src/pudl/convert/epacems_to_parquet.py,,epacems_to_parquet,#Any#Any#Any#Any#Any#Any#Any#,168
Before Change
// double check that all of the years you are asking for are actually in
_verify_cems_args(data_path, epacems_years, epacems_states)
for file in data_path.iterdir():
if "epacems" in file.name:
df_name = file.name[:file.name.find(".")]
year = int(df_name[25:29])
state = df_name[30:].upper()
// only convert the years and states that you actually want
if year in epacems_years and state in epacems_states:
df = pd.read_csv(
file, dtype=in_types, parse_dates=["operating_datetime_utc"]
).assign(year=year)
logger.info(
f"Converted {len(df)} records for {year} and {state}."
)
pq.write_to_dataset(
pa.Table.from_pandas(
df, preserve_index=False, schema=schema),
root_path=str(out_dir), partition_cols=list(partition_cols),
compression=compression)
def parse_command_line(argv):
Parse command line arguments. See the -h option.
After Change
// Verify that all the requested data files are present:
epacems_years = list(epacems_years)
epacems_years.sort()
epacems_states = list(epacems_states)
epacems_states.sort()
for year in epacems_years:
for state in epacems_states:
newpath = pathlib.Path(
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: catalyst-cooperative/pudl
Commit Name: f967bd87424bbc50f475d5959994a5743ae2af0e
Time: 2019-12-28
Author: zane.selvans@catalyst.coop
File Name: src/pudl/convert/epacems_to_parquet.py
Class Name:
Method Name: epacems_to_parquet
Project Name: Qiskit/qiskit-aqua
Commit Name: 2623e2cc3a76b7e7c7c4ea95f93077c6270cd05c
Time: 2019-02-15
Author: shaohan.hu@ibm.com
File Name: test/test_simon.py
Class Name: TestSimon
Method Name: test_simon
Project Name: comic/grand-challenge.org
Commit Name: 28935ea4d7796ada4ad387e79c4357b21c5b9ad6
Time: 2020-03-26
Author: 57257130+MikeOverkamp-diag@users.noreply.github.com
File Name: app/grandchallenge/reader_studies/models.py
Class Name: ReaderStudy
Method Name: add_ground_truth