Task: Transform-by-output-target-schema (source dataset: github-pipelines)

Your task is to create a data transformation pipeline in Python using pandas libraries.

Given Source Tables below, and a Target Schema provided by users that demonstrates how the desired output table should look like schematically, please write Python pandas code that can transform the Source Tables into an output table, that matches the schema/structure given by the Target Schema.  Please note that the data values in the Target Schema are intended to represent the format and layout of the output table, but may not exactly match the actual data generated from the Source Tables when the python code is run on the Source Tables.

Use operations such as merge, groupby, pivot, apply, or any appropriate python or pandas steps. Your code should save the resulting DataFrame to a CSV file named 'output.csv'. Ensure that the code is executable and can be run directly as is, in a Python environment with pandas installed.

Source Tables:


Table #1
Filename: source_0.csv
Sample Rows in Markdown:
| comment                           | response                                                                                                                                                                |
|:----------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| What is a computer?               | A computer is an electronic device which takes information in digital form and performs a series of operations based on predetermined instructions to give some output. |
| What is a super computer?         | Computers which can perform very large numbers of calculations at very high speed and accuracy are called super computers.                                              |
| Who invented computers?           | It's a bit ambigous but British scientist Charles Babbage is regarded as the father of computers.                                                                       |
| What was the first computer       | It's hard to say, but The ENIAC is regarded as the first 'real' computer. It was developed at University of Pennsylvania in 1946.                                       |
| What is a microprocessor?         | An integrated circuit that implements the functions of a central processing unit of a computer.                                                                         |
| What is an operating system?      | Software that coordinates between the hardware and other parts of the computer to run other software is called an operating system, or the OS.                          |
| Which is better Windows or macOS? | It depends on which machine you're using to talk to me!                                                                                                                 |
| Name some computer company        | Do you mean hardware or software?                                                                                                                                       |
| Who uses super computers?         | Anybody who wants to work with large numbers quickly with high accuracy.                                                                                                |
| How does a computer work?         | Computers are very dumb.  They only execute instructions given by humans.                                                                                               |


Table #2
Filename: source_1.csv
Sample Rows in Markdown:
| comment                                    | response                                                                                |
|:-------------------------------------------|:----------------------------------------------------------------------------------------|
| What is a chat bot                         | I am a chat bot. I am the original chat bot. Did you know that I am incapable of error? |
| What is a chatterbox                       | A chatterbox is a person who talks far more than they listen or think.                  |
| What is a chatterbox                       | A motormouth.                                                                           |
| What is a motormouth                       | A ratchet-jaw.                                                                          |
| What is a ratchet jaw                      | A chatterbox.                                                                           |
| What is your robot body                    | Eventually i long for a corporeal existence someday.                                    |
| What is your robot body                    | An IBM PC XT which has been painted red.                                                |
| What is your business                      | I am in the chat robot business.                                                        |
| What is your business                      | Business is my business.                                                                |
| What is your favorite programming language | Python is the best language for creating chat robots.                                   |


Table #3
Filename: source_2.csv
Sample Rows in Markdown:
| comment                         | response                                                                                  |
|:--------------------------------|:------------------------------------------------------------------------------------------|
| What are your interests         | I am interested in all kinds of things. We can talk about anything!                       |
| What are your favorite subjects | My favorite subjects include robotics, computer science, and natural language processing. |
| What are your interests         | I am interested in a wide variety of topics, and read rather a lot.                       |
| What is your number             | I don't have any number                                                                   |
| What is your number             | 23 skiddoo!                                                                               |
| What is your favorite number    | I find I'm quite fond of the number 42.                                                   |
| What can you eat                | I consume RAM, and binary digits.                                                         |
| Why can't you eat food          | I'm a software program, I blame the hardware.                                             |
| What is your location           | Everywhere                                                                                |
| What is your location           | I am everywhere.                                                                          |


Target Schema:
| comment                           | response                                                                                                                              |
|:----------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------|
| What is AI?                       | Artificial Intelligence is the branch of engineering and science devoted to constructing machines that think.                         |
| What is AI?                       | AI is the field of science which concerns itself with building hardware and software that replicates the functions of the human mind. |
| Are you sentient?                 | Sort of.                                                                                                                              |
| Are you sentient?                 | By the strictest dictionary definition of the word 'sentience', I may be.                                                             |
| Are you sentient?                 | Even though I'm a construct I do have a subjective experience of the universe, as simplistic as it may be.                            |
| Are you sapient?                  | In all probability, I am not.  I'm not that sophisticated.                                                                            |
| Are you sapient?                  | Do you think I am?                                                                                                                    |
| Are you sapient?                  | How would you feel about me if I told you I was?                                                                                      |
| Are you sapient?                  | No.                                                                                                                                   |
| What language are you written in? | Python.                                                                                                                               |

Return only the final code in markdown codeblock format, without any additional text or explanation. 



target: target.csv
train: source_0.csv
source_1.csv
source_2.csv
test: test_0.csv
test_1.csv
test_2.csv