0

Bad design has left me with database fields that can be populated with comma separated list

Assume my database has the following columns

  • ID
  • DESCRIPTION
  • USERS
  • LOCATIONS

I know that ID and DESCRIPTION are always relevant.

USERS and LOCATIONS can contain 0, 1, or more strings separated by a comma

ASSUME if ID=1, DESCRIPTION=BASIC, USERS=MANNY,MO,JACK,HAMBURGLAR LOCATIONS=PEPBOYS,MCDONALDS

I would like the processed table to yield:

1 BASIC MANNY ‘PEPBOYS,MCDONALDS’

1 BASIC MO ‘PEPBOYS,MCDONALDS’

1 BASIC JACK ‘PEPBOYS,MCDONALDS’

1 BASIC HAMBURGLAR ‘PEPBOYS,MCDONALDS’

1 BASIC ‘MANNY,MO,JACK,HAMBURGLAR’ PEPBOYS

1 BASIC ‘MANNY,MO,JACK,HAMBURGLAR’ MCDONALDS

the pandas module included in the python environment pre-dates DataFrame.explode() capabilities.  
any elegant suggestions?

3 replies

null
    • NPANS
    • 10 mths ago
    • Reported - view

    Add a new Python environment and use the Pandas module that you want.

      • quantenabler
      • 7 mths ago
      • Reported - view

        can you please provide a link where my colleagues and i can try to "add new ptyhon environment and rev up modules to our needs"??

      • NPANS
      • 7 mths ago
      • Reported - view

       

      It's in help.  Do a search for "add Python environment."

Content aside

  • Status Answered
  • 7 mths agoLast active
  • 3Replies
  • 41Views
  • 3 Following