Sentiment Analysis in Power BI

Поділитися
Вставка
  • Опубліковано 26 лис 2024

КОМЕНТАРІ • 28

  • @ced4030
    @ced4030 3 роки тому +5

    Very helpful vid so thanks for making it! I ran into some errors along the way with both python and power bi but googling helped solve those. To save others some trouble: 1. in python, you may have to convert your 'x' variable to a string inside of the lambda function if your read command doesn't auto convert to that type. 2. your dataframe must be labeled to dataset as in the video. df doesnt work since powerbi is expecting dataset specifically. 3. make sure your python options in the desktop are infact set to your python installation. by default mines was set to an old installation. Hope that helps the folks after me!

    • @HendrikTuc
      @HendrikTuc 3 роки тому

      hey, thank you for your help.
      where exactly do you convert the x into str?
      do you use .astype(str)?
      Kind regards
      Hendrik

    • @ced4030
      @ced4030 3 роки тому +1

      @@HendrikTuc It has been a while since I have used this code, but i believe it was something like lambda x: sia.polarity_scores(str(x)) - no need for astype(str) inside the lambda anyways. Because lambda x means that x is referencing each row of the dataframe.

    • @raniasaleh3999
      @raniasaleh3999 Рік тому +1

      This was really helpful, this string issue solved my error. many thanks!

    • @rashmikrishnamohan1736
      @rashmikrishnamohan1736 Рік тому +1

      @@ced4030 heyy thank u so much! this helped!!

    • @ced4030
      @ced4030 Рік тому

      @@rashmikrishnamohan1736 my pleasure!

  • @girishrainbow
    @girishrainbow 4 роки тому +1

    Hi in spyder i have to use
    Dataset= pd.read.excel('filename.xlsx',encoding = 'utf-8').astype(str)
    What will i jave to do that in power bi for this I am very new to python code learnt using ur videos
    Thanks

  • @ntrax8214
    @ntrax8214 4 роки тому

    when i run, i get 1 or 0 or -1.
    I don't get decimals, why?

  • @garyhuang11
    @garyhuang11 4 роки тому

    if I wanted to run against more than 1 column, do I repeat line 13: dataset = dataset.apply etc. for each column creating a new column for each line of code?

    • @absentdata
      @absentdata  4 роки тому

      Yes you can apply that function to new column. Line 13 is creating a column of results

  • @MrSoggycat
    @MrSoggycat 5 років тому

    DataSource.Error: ADO.NET: Python script error.
    Traceback (most recent call last):
    File "PythonScriptWrapper.PY", line 2, in
    import os, pandas, matplotlib
    File "C:\USERS\JASON\ANACONDA3\lib\site-packages\pandas\__init__.py", line 17, in
    "Unable to import required dependencies:
    " + "
    ".join(missing_dependencies)
    ImportError: Unable to import required dependencies:
    numpy: DLL load failed: The specified module could not be found.
    Details:
    I get this error when I try to run the python script. what is happening?

    • @absentdata
      @absentdata  5 років тому

      Make sure you have Python installed and Power BI connected to it's source.

  • @kamgoogle7115
    @kamgoogle7115 4 роки тому

    isnt it 0.05?

  • @adelaidenembaleni3380
    @adelaidenembaleni3380 5 років тому

    When I try to change the polarity scores to a decimal I get an error.

    • @absentdata
      @absentdata  5 років тому +1

      I'm assuming this happens on the Power BI edit queries section. Id try to filter your column to see if there are any issues before conversion.

    • @adelaidenembaleni3380
      @adelaidenembaleni3380 5 років тому

      @@absentdata Thank you

  • @TechieDC
    @TechieDC 4 роки тому

    Getting this error -
    DataSource.Error: ADO.NET: A problem occurred while processing your Python script.
    Here are the technical details: Process must exit before requested information can be determined.
    Details:
    DataSourceKind=Python
    DataSourcePath=Python
    Message=A problem occurred while processing your Python script.
    Here are the technical details: Process must exit before requested information can be determined.
    ErrorCode=-2147467259
    ExceptionType=Microsoft.PowerBI.Scripting.Python.Exceptions.PythonUnexpectedException
    What can be the issue?

    • @johnfromireland7551
      @johnfromireland7551 4 роки тому

      This might solve your problem: community.powerbi.com/t5/Desktop/Message-ErrorCode-2147467259/td-p/775959

  • @zhangmr7955
    @zhangmr7955 2 роки тому

    Would u please provide the dataset link for follow? Thanks

  • @123jamalq
    @123jamalq 5 років тому +1

    This is very excellent tutorial but when i am following your video, my power bi is showing the following error:
    DataSource.Error: ADO.NET: Python script error.
    Traceback (most recent call last):
    File "PythonScriptWrapper.PY", line 19, in
    mydataset['polairty scores'] =mydataset['Message'].apply(lambda x: sia.polarity_scores(x)['compound'])
    NameError: name 'mydataset' is not defined
    Details:
    DataSourceKind=Python
    DataSourcePath=Python
    Message=Python script error.
    Traceback (most recent call last):
    File "PythonScriptWrapper.PY", line 19, in
    mydataset['polairty scores'] =mydataset['Message'].apply(lambda x: sia.polarity_scores(x)['compound'])
    NameError: name 'mydataset' is not defined
    ErrorCode=-2147467259
    ExceptionType=Microsoft.PowerBI.Scripting.Python.Exceptions.PythonScriptRuntimeException

    • @123jamalq
      @123jamalq 5 років тому

      However, it is working well with python where i am using Spyder

    • @absentdata
      @absentdata  5 років тому

      You shouldn't be creating a new variable called 'mydataset'. Research the video. Power BI creates a default variable called dataset. You can see this in notation when opening the script editor.

  • @lrincon4901
    @lrincon4901 3 роки тому

    Great video! thanks a lot

  • @marcelaandreacastrillonbui7951
    @marcelaandreacastrillonbui7951 3 роки тому

    Save 😍