@@ -23,53 +23,43 @@ class PandasParameterChecker(BaseChecker):
2323 # Define required parameters for specific Pandas classes and methods
2424 REQUIRED_PARAMS = {
2525 # DataFrame creation
26- 'DataFrame' : ['data' ], # The primary input data for DataFrame creation
27-
26+ "DataFrame" : ["data" ], # The primary input data for DataFrame creation
2827 # Concatenation
29- 'concat' : ['objs' ], # The list or dictionary of DataFrames/Series to concatenate
30-
28+ "concat" : ["objs" ], # The list or dictionary of DataFrames/Series to concatenate
3129 # DataFrame I/O (Input/Output)
32- 'read_csv' : ['filepath_or_buffer' , 'dtype' ], # Path to CSV file or file-like object; column data types
33- 'read_excel' : ['io' , 'dtype' ], # Path to Excel file or file-like object; column data types
34- 'read_table' : ['filepath_or_buffer' , 'dtype' ], # Path to delimited text-file or file object; column data types
35- 'to_csv' : ['path_or_buf' ], # File path or buffer to write the DataFrame to
36- 'to_excel' : ['excel_writer' ], # File path or ExcelWriter object to write the data to
37-
30+ "read_csv" : ["filepath_or_buffer" , "dtype" ], # Path to CSV file or file-like object; column data types
31+ "read_excel" : ["io" , "dtype" ], # Path to Excel file or file-like object; column data types
32+ "read_table" : ["filepath_or_buffer" , "dtype" ], # Path to delimited text-file or file object; column data types
33+ "to_csv" : ["path_or_buf" ], # File path or buffer to write the DataFrame to
34+ "to_excel" : ["excel_writer" ], # File path or ExcelWriter object to write the data to
3835 # Merging and Joining
39- 'merge' : ['right' , 'how' , 'on' , 'validate' ], # The DataFrame or Serie to merge with
40- 'join' : ['other' ], # The DataFrame or Series to join
41-
36+ "merge" : ["right" , "how" , "on" , "validate" ], # The DataFrame or Serie to merge with
37+ "join" : ["other" ], # The DataFrame or Series to join
4238 # DataFrame Operations
43- 'pivot_table' : ['index' ], # The column to pivot on (values and columns have defaults)
44- 'groupby' : ['by' ], # The key or list of keys to group by
45- 'resample' : ['rule' ], # The frequency rule to resample by
46-
39+ "pivot_table" : ["index" ], # The column to pivot on (values and columns have defaults)
40+ "groupby" : ["by" ], # The key or list of keys to group by
41+ "resample" : ["rule" ], # The frequency rule to resample by
4742 # Data Cleaning and Transformation
48- 'fillna' : ['value' ], # Value to use to fill NA/NaN values
49- 'drop' : ['labels' ], # Labels to drop
50- 'drop_duplicates' : ['subset' ], # Subset of columns to consider when dropping duplicates
51- 'replace' : ['to_replace' ], # Values to replace
52-
43+ "fillna" : ["value" ], # Value to use to fill NA/NaN values
44+ "drop" : ["labels" ], # Labels to drop
45+ "drop_duplicates" : ["subset" ], # Subset of columns to consider when dropping duplicates
46+ "replace" : ["to_replace" ], # Values to replace
5347 # Plotting
54- 'plot' : ['x' ], # x-values or index for plotting
55- 'hist' : ['column' ], # Column to plot the histogram for
56- 'boxplot' : ['column' ], # Column(s) to plot boxplot for
57-
48+ "plot" : ["x" ], # x-values or index for plotting
49+ "hist" : ["column" ], # Column to plot the histogram for
50+ "boxplot" : ["column" ], # Column(s) to plot boxplot for
5851 # DataFrame Sorting
59- 'sort_values' : ['by' ], # Column(s) to sort by
60- 'sort_index' : ['axis' ], # Axis to sort along (index=0, columns=1)
61-
52+ "sort_values" : ["by" ], # Column(s) to sort by
53+ "sort_index" : ["axis" ], # Axis to sort along (index=0, columns=1)
6254 # Statistical Functions
63- 'corr' : ['method' ], # Method to use for correlation ('pearson', 'kendall', 'spearman')
64- 'describe' : [], # No required parameters, but additional ones could be specified
65-
55+ "corr" : ["method" ], # Method to use for correlation ('pearson', 'kendall', 'spearman')
56+ "describe" : [], # No required parameters, but additional ones could be specified
6657 # Windowing/Resampling Functions
67- 'rolling' : ['window' ], # Size of the moving window
68- 'ewm' : ['span' ], # Span for exponentially weighted calculations
69-
58+ "rolling" : ["window" ], # Size of the moving window
59+ "ewm" : ["span" ], # Span for exponentially weighted calculations
7060 # Miscellaneous Functions
71- ' apply' : [' func' ], # Function to apply to the data
72- ' agg' : [' func' ], # Function or list of functions for aggregation
61+ " apply" : [" func" ], # Function to apply to the data
62+ " agg" : [" func" ], # Function or list of functions for aggregation
7363 }
7464
7565 @only_required_for_messages ("pandas-parameter" )
0 commit comments