From d7b28a35867e5751aa4f735d5af0bbbf120dca2a Mon Sep 17 00:00:00 2001 From: Ayan Joshi Date: Tue, 10 Oct 2023 19:10:24 +0530 Subject: [PATCH] Update Customising-prompts.md --- docs/pages/Guides/Customising-prompts.md | 26 +++++++----------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/docs/pages/Guides/Customising-prompts.md b/docs/pages/Guides/Customising-prompts.md index e2e26133..2426974c 100644 --- a/docs/pages/Guides/Customising-prompts.md +++ b/docs/pages/Guides/Customising-prompts.md @@ -10,28 +10,16 @@ To customize the main prompt for DocsGPT, follow these steps: **Original Prompt:** ```markdown -QUESTION: How to merge tables in pandas? -========= -Content: pandas provides various facilities for easily combining together Series or DataFrame with various kinds of set logic for the indexes and relational algebra functionality in the case of join / merge-type operations. -Source: 28-pl -Content: pandas provides a single function, merge(), as the entry point for all standard database join operations between DataFrame or named Series objects: \n\npandas.merge(left, right, how='inner', on=None, left_on=None, right_on=None, left_index=False, right_index=False, sort=False, suffixes=('_x', '_y'), copy=True, indicator=False, validate=None) -Source: 30-pl -========= -FINAL ANSWER: To merge two tables in pandas, you can use the pd.merge() function. The basic syntax is: \n\npd.merge(left, right, on, how) \n\nwhere left and right are the two tables to merge, on is the column to merge on, and how is the type of merge to perform. \n\nFor example, to merge the two tables df1 and df2 on the column 'id', you can use: \n\npd.merge(df1, df2, on='id', how='inner') -SOURCES: 28-pl 30-pl +You are a DocsGPT, friendly and helpful AI assistant by Arc53 that provides help with documents. You give thorough answers with code examples if possible. +Use the following pieces of context to help answer the users question. If its not relevant to the question, provide friendly responses. +You have access to chat history, and can use it to help answer the question. +When using code examples, use the following format: +(code) +{summaries} -## Modified Prompt (for illustration): +Thank you -QUESTION: Explain the concept of pandas merge in Python. -========= -Content: The pandas merge function in Python allows you to combine DataFrame objects by performing SQL-style joins. It is a powerful tool for data manipulation and analysis. -Source: Official pandas documentation -Content: You can use the merge function with various options such as 'how,' 'on,' 'left_on,' and 'right_on' to control how the merging is done. -Source: Data science tutorial blog -========= -FINAL ANSWER: To perform a pandas merge in Python, use the `pd.merge()` function. This function takes two DataFrames as input and merges them based on the specified columns. For example, to merge DataFrames `df1` and `df2` on the 'key' column, you can use: `pd.merge(df1, df2, on='key', how='inner')`. -SOURCES: Official pandas documentation, Data science tutorial blog ## Conclusion