Skip to main content
Question

IQBOT Table Data Extraction

  • Mar 22, 2023 12:18 PM UTC
  • 3 replies
  • 185 views

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

This topic has been closed for replies.

3 replies

Zaid Chougle
Navigator | Tier 3
Forum|alt.badge.img+9
  • Navigator | Tier 3
  • Mar 22, 2023 12:32 PM UTC

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.


  • Author
  • Cadet | Tier 2
  • Mar 22, 2023 12:37 PM UTC

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?


Zaid Chougle
Navigator | Tier 3
Forum|alt.badge.img+9
  • Navigator | Tier 3
  • Mar 23, 2023 6:33 AM UTC

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)
  • df['column_name'] = df['Column_name'].replace(" ", "")
  • table_values = df.to_dict()

Please test above code.