calculate_correlation
autogen.agentchat.contrib.captainagent.tools.data_analysis.calculate_correlation.calculate_correlation
calculate_correlation
Calculate the correlation between two columns in a CSV file.
Parameters:Name | Description |
---|---|
csv_path | The path to the CSV file. Type: str |
column1 | The name of the first column. Type: str |
column2 | The name of the second column. Type: str |
method | The method used to calculate the correlation. - ‘pearson’ (default): Pearson correlation coefficient. - ‘kendall’: Kendall Tau correlation coefficient. - ‘spearman’: Spearman rank correlation coefficient. - callable: A custom correlation function that takes two arrays and returns a scalar. Type: str Default: ‘pearson’ |
Type | Description |
---|---|
float | float: The correlation coefficient between the two columns. |