Skip to main content

Folks

Have a scenario, trying to cleanse the table data in iqbot for the below scenario can anyone help me with the python code.

Table Data will have space followed by any special character, wherein we need to remove the space.

Ex:

Input : ( USA )

Output : (USA)

Friendly Note: Have already gone through all the forms and no getting right solution for this

Folks

Have a scenario, trying to cleanse the table data in iqbot for the below scenario can anyone help me with the python code.

Table Data will have space followed by any special character, wherein we need to remove the space.

Ex:

Input : ( USA )

Output : (USA)

Friendly Note: Have already gone through all the forms and no getting right solution for this

Hi @DavidQ ,

  • Inside custom scripts for IQ Bot you can use the replace function after converting the data frame. You can use the replace for space to nothing. Might help.

Let me know whether the solution works or not.


Folks

Have a scenario, trying to cleanse the table data in iqbot for the below scenario can anyone help me with the python code.

Table Data will have space followed by any special character, wherein we need to remove the space.

Ex:

Input : ( USA )

Output : (USA)

Friendly Note: Have already gone through all the forms and no getting right solution for this

Hi @DavidQ ,

  • Inside custom scripts for IQ Bot you can use the replace function after converting the data frame. You can use the replace for space to nothing. Might help.

Let me know whether the solution works or not.

Hi Can you share the code?


Folks

Have a scenario, trying to cleanse the table data in iqbot for the below scenario can anyone help me with the python code.

Table Data will have space followed by any special character, wherein we need to remove the space.

Ex:

Input : ( USA )

Output : (USA)

Friendly Note: Have already gone through all the forms and no getting right solution for this

Hi @DavidQ ,

  • Inside custom scripts for IQ Bot you can use the replace function after converting the data frame. You can use the replace for space to nothing. Might help.

Let me know whether the solution works or not.

Hi Can you share the code?

Hey @DavidQ ,

  • import pandas as pd
  • df = pd.DataFrame.from_dict(table_values)
  • dfi'column_name'] = df='Column_name'].replace(" ", "")
  • table_values = df.to_dict()

Please test above code.


Reply