title: How to clean images format in a pandas dataframe?
body: <p>I have fetched some images and stores in a dataframe column-df['images']</p>
  
  <p>Currently the images are fetched in following formats-</p>
  
  <pre><code>['image1.jpg','image2.jpg','','','']
  </code></pre>
  
  <p>Now I need to remove bracket and '' from this as below-</p>
  
  <pre><code>image1.jpg,image2.jpg
  </code></pre>
  
  <p>I tried with below function but it is not working-</p>
  
  <pre><code>def clean_images(imagearray):
  for ch in ['[', ']',', ''',', ,']:
      if ch in imagearray:
          imagearray = string.replace(ch, "")
          print(imagearray)
  return imagearray
  </code></pre>
  
  <p>My dataframe look like below-
  <a href="https://i.stack.imgur.com/TL6Qq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TL6Qq.png" alt="enter image description here"></a></p>
  
  <p>Can anyone share me the right way to achieve this?</p>
  
  <p>Following is the content of df.head().to_dict()-</p>
  
  <pre><code>{'Available': {0: 33, 1: 22, 2: 12, 3: 12, 4: 11}, 'Images': {0: ['https://example.com/e1e619ab5f11ffe311db03eefad5a2f4.jpg', 'https://example.com/7edc2e3cda8b63591bfacda9e254ad08.jpg', 'https://example.com/7ed2b44335f73cabe0411819820e4d0b.jpg', 'https://example.com/82fed0e56c531cde2fcf5b98f7418a6a.jpg', 'https://example.com/f536c423a97d0c9ab8c488a453818780.jpg', '', '', ''], 1: ['https://example.com/7d63597ae7a75b8481d9d4318951d6c1.jpg', '', '', '', '', '', '', ''], 2: ['https://example.com/7476c30281056d6810787c617fb4f30e.jpg', 'https://example.com/d59266704fa3f9750c02ea79956acf1e.jpg', '', '', '', '', '', ''], 3: ['https://example.com/7476c30281056d6810787c617fb4f30e.jpg', 'https://example.com/af285804c936cd3278cb2982b6f7a089.jpg', '', '', '', '', '', ''], 4: ['https://example.com/e4b6927a6bf8ad48394534c657ea0994.jpg', 'https://example.com/e630996c631e35013be0fbe0c0113fc5.jpg', '', '', '', '', '', '']}, 'SellerSku': {0: 'SCF285/01', 1: 'Munchkin Multi Forks and Spoons set', 2: 'TR0324-GB01-Fairy', 3: 'TR0323-GB01-Police Car', 4: 'DKLAN 24 -Off White'}, 'ShopSku': {0: '235588426_SGAMZ-361374143', 1: '234623934_SGAMZ-359543733', 2: '235653608_SGAMZ-361464759', 3: '235653608_SGAMZ-361464758', 4: '234907012_SGAMZ-359972591'}, 'SkuId': {0: 361374143, 1: 359543733, 2: 361464759, 3: 361464758, 4: 359972591}, 'Status': {0: 'active', 1: 'active', 2: 'active', 3: 'active', 4: 'active'}, 'Url': {0: 'https://example.com/-i235588426-s361374143.html', 1: 'https://example.com/-i234623934-s359543733.html', 2: 'https://example.com/-i235653608-s361464759.html', 3: 'https://example.com/-i235653608-s361464758.html', 4: 'https://example.com/-i234907012-s359972591.html'}, '_compatible_variation_': {0: 'SCF285/01', 1: 'Multicolor', 2: 'Fairy', 3: 'Police Car', 4: 'Off White'}, 'color_family': {0: 'SCF285/01', 1: 'Multicolor', 2: 'Fairy', 3: 'Police Car', 4: 'Off White'}, 'color_thumbnail': {0: nan, 1: nan, 2: nan, 3: nan, 4: nan}, 'package_content': {0: 'Avent 3 in 1 electric steam sterilizer x1', 1: 'Multi Forks and Spoons x1', 2: 'Trunki kid suitcase luggage x1', 3: 'Trunki kid suitcase luggage x1', 4: 'DKLAN 24 Bicycle x1'}, 'package_height': {0: '1', 1: '1', 2: '13', 3: '13', 4: '1'}, 'package_length': {0: '1', 1: '1', 2: '12', 3: '12', 4: '1'}, 'package_weight': {0: '1', 1: '999', 2: '1', 3: '1', 4: '1000'}, 'package_width': {0: '11', 1: '1', 2: '11', 3: '11', 4: '1'}, 'price': {0: 109.0, 1: 8.9, 2: 80.91, 3: 80.91, 4: 178.0}, 'quantity': {0: 33, 1: 22, 2: 12, 3: 12, 4: 11}, 'special_from_date': {0: nan, 1: nan, 2: nan, 3: nan, 4: nan}, 'special_from_time': {0: nan, 1: nan, 2: nan, 3: nan, 4: nan}, 'special_price': {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 0.0}, 'special_time_format': {0: nan, 1: nan, 2: nan, 3: nan, 4: nan}, 'special_to_date': {0: nan, 1: nan, 2: nan, 3: nan, 4: nan}, 'special_to_time': {0: nan, 1: nan, 2: nan, 3: nan, 4: nan}}
  </code></pre>