-
Notifications
You must be signed in to change notification settings - Fork 736
Refactor load_data for consistent sheet handling and cleaner code #488
Conversation
- Ensure sheet_name is always treated as a list to maintain consistent behavior - Remove redundant parentheses from self._row_joiner - Rename variable for clarity (from 'keys' to 'sheet_names') - Update function docstring to reflect changes
Hi @jerryjliu, |
@guyy1232 sorry for the delay! reviewing now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approving this, though one comment. is it possible to keep include_sheetname
as the variable? changing it might break backwards compatibility
Thank you for reviewing! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed include_sheet_name back to "include_sheetname" for back compatibility (removed the "_")
nice one |
This PR addresses an issue in the
load_data
function when reading a specific sheet from an Excel file and performs code simplification.Issues Addressed:
self._row_joiner
.Changes Made:
sheet_name
is processed always to treat it as a list, ensuring consistent behavior across single or multiple sheet name inputs.self._row_joiner
for cleaner code.keys
tosheet_names
for better clarity.By implementing these changes, the function is now more robust and can handle different input scenarios effectively. Additionally, the code has been streamlined for better readability.