Closed vddo closed 4 months ago
Hi, I have a question regarding the import_csv function in Getting started > Importing your first event log > Loading csv files.
Getting started > Importing your first event log > Loading csv files
def import_csv(file_path): event_log = pandas.read_csv(file_path, sep=';') num_events = len(event_log) num_cases = len(event_log.case_id.unique()) print("Number of events: {}\nNumber of cases: {}".format(num_events, num_cases))
In line 4 (num_cases) how can case_id be an attribute of pandas.DataFrame? Maybe it should look like this:
num_cases
case_id
pandas.DataFrame
num_cases = len(event_log['case_id'].unique())
Dear @vddo
If the name of the column does not contain strange characters, like in the mentioned situation, then dataframe.case_id is equivalent to dataframe["case_id"]
Hi, I have a question regarding the import_csv function in
Getting started > Importing your first event log > Loading csv files
.In line 4 (
num_cases
) how cancase_id
be an attribute ofpandas.DataFrame
? Maybe it should look like this: