isudatateam / datateam

Use items() to iterate over a dictionary PTC-W0011
Anti-pattern
Major
3 months ago3 months old
Consider using df.items() to iterate over the dictionary
242        df = process5(fn)
243    elif fmt == "6":
244        df = process6(fn)
245    for plotid in df:246        database_save(df[plotid], uniqueid, plotid, project)
247
248
Consider using df.items() to iterate over the dictionary
773    elif fmt == "8":
774        df = process8(fn)
775    if isinstance(df, dict):
776        for plot in df:777            print(
778                ("File: %s[%s] found: %s lines for columns %s")
779                % (fn, plot, len(df[plot].index), df[plot].columns)
Consider using df.items() to iterate over the dictionary
336    elif fmt == "7":
337        df = process7(uniqueid, fn)
338    if isinstance(df, dict):
339        for plot in df:340            print(
341                ("File: %s[%s] found: %s lines for columns %s")
342                % (fn, plot, len(df[plot].index), df[plot].columns)