Data Manipulation is one of the significant activity of any Data Science or Predictive Modeling project. If you have any scenarios or examples, do share with us and other users.
Data Manipulations using Python
Scenario 1: I have a "list" object and values of the list is City and Country separated by a comma. Want to split each of the elements into two values so that we can have city and country separately.
Scenario 2: Similar to scenario 1, but have a column in a data frame which takes values as City and Country separated by a comma. Want to split the column into two columns each for city and country .
Scenario 3: I have a list with each element of list has textual value with embedded blank space and multiple lines. I want to remove the multiple lines.
'\n\nSatguru International\n\n Mumbai, India \n\n\n\n\n We Satguru International (merchant exporter) \n\n\n\n\n\n\n\n'
Scenario 4: While web scraping, we have 2 ResultSet objects and we want to append these in python.
Scenario 5: I have extracted text after web scraping and the last element of the list is garbage value. How do you get size of a list in Python? How you remove the last element of a list in a Python?
Scenario 6: In my list some of the elements are not proper and I found a pattern in those values. I want to remove all those elements. First we want to find indexes and then remove those elements. So remove element with a value and more generic containing a string value.