microsoft / semantic-link-labs

Early access to new features for Microsoft Fabric's Semantic Link.
MIT License
178 stars 37 forks source link

vertipaq analyzer 0.8.2 #185

Closed muhssamy closed 1 month ago

muhssamy commented 1 month ago

i am using this code to loop extract vpax data from my models and it was working last few days

labs.vertipaq_analyzer(dataset=model_name, workspace=Workspace_name, export="table")

and now i am getting this error

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/tmp/ipykernel_7144/611349508.py in ?()
      3 display("We Have " + str(len(fields)) + f" Models in {Workspace_name}")
      4 for x in fields:
      5     model_name = x.get("displayName", "")
      6     display(model_name)
----> 7     labs.vertipaq_analyzer(dataset=model_name, workspace=Workspace_name, export="table")

~/cluster-env/clonedenv/lib/python3.10/site-packages/sempy/_utils/_log.py in ?(*args, **kwargs)
    295                 message["total_seconds"] = extractor.get_execution_time()
    296                 extractor.logger.error(message, extra, exc_info=True)
    297                 raise
    298             finally:
--> 299                 extractor.logger.setLevel(saved_log_level)
    300             return result

~/cluster-env/clonedenv/lib/python3.10/site-packages/sempy_labs/_vertipaq.py in ?(dataset, workspace, export, read_stats_from_data, **kwargs)
    336         if v in ["int", "long"]:
    337             int_cols.append(k)
    338         elif v in ["float", "double"] and k != "Temperature":
    339             pct_cols.append(k)
--> 340     colSize[int_cols] = colSize[int_cols].map("{:,}".format)
    341     temp[int_cols] = temp[int_cols].map("{:,}".format)
    342     colSize[pct_cols] = colSize[pct_cols].map("{:.2f}%".format)
    343     temp[pct_cols] = temp[pct_cols].map("{:.2f}%".format)

~/cluster-env/clonedenv/lib/python3.10/site-packages/pandas/core/generic.py in ?(self, name)
   5985             and name not in self._accessors
   5986             and self._info_axis._can_hold_identifiers_and_holds_name(name)
   5987         ):
   5988             return self[name]
-> 5989         return object.__getattribute__(self, name)

AttributeError: 'DataFrame' object has no attribute 'map'
muhssamy commented 1 month ago

sorry, this is a bug not an enhancement request

m-kovalsky commented 1 month ago

Hmm...I don't get this issue but I will apply a fix which resolves it for you.

m-kovalsky commented 1 month ago

Fixed in 0.8.3.