eda_toolkit 0.0.1c
Pre-release
Pre-release
Release Notes
Changes from main_old.py
to main.py
1. Imports and Dependencies:
- Removed:
import datetime
.
- Added:
import matplotlib.ticker as mticker
for formatting.import sys
for conditional imports.- Conditional import of
datetime
depending on Python version (sys.version_info
).
2. Function Changes:
-
Function
add_ids
:- Parameter Modifications:
column_name
renamed toid_colname
.- New parameters
num_digits
to specify ID digit length, andset_as_index
to optionally set the new ID column as the index.
- Functionality Update:
- Allows setting the new ID column as an index and customizes the number of digits in generated IDs.
- Documentation Update: Expanded to describe new parameters and functionality.
- Parameter Modifications:
-
Function
scatter_plots_grid
:- New Functionality:
- Added options for customizing axis limits (
xlim
,ylim
). - Enhanced options for saving plots as PNG or SVG.
- Added support for showing or hiding plots based on user preference (
show_plot
parameter). - Improved legend management with the option to show or remove the legend.
- Introduced parameters to control tick labels and axis label font sizes.
- Added options for customizing axis limits (
- New Functionality:
-
Plot Saving and Displaying Enhancements:
- The code for saving and displaying plots has been refactored:
- Saving individual plots: Can now be conditionally saved based on user input (
save_individual
). - Saving and displaying grids: Improved support for saving grids of plots as a single image and displaying them conditionally.
- Saving individual plots: Can now be conditionally saved based on user input (
- The code for saving and displaying plots has been refactored:
-
Additional Enhancements:
- Introduced new function for fitting and plotting best-fit lines in scatter plots.
3. New Functions:
add_best_fit
:- Description: Adds a best-fit line to a scatter plot with customizable line style and color.
- Parameters:
ax
,x_data
,y_data
,line_style
,line_color
.
4. Code Structural Changes:
-
Comment and Documentation Updates:
- Improved and expanded docstrings and inline comments.
- Added detailed explanations for new parameters and functionalities.
-
Refactoring:
- Plotting-related code was reorganized for better readability and maintainability.
5. Bug Fixes and Enhancements:
-
Plotting Enhancements:
- Improved handling of axis visibility and edge cases.
- Enhanced plot saving mechanisms to ensure correct file naming and prevent overwriting.
-
Error Handling:
- Improved error handling and warnings related to file saving and plotting.