imsciences 0.6.2.7__tar.gz → 0.6.2.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {imsciences-0.6.2.7 → imsciences-0.6.2.9}/PKG-INFO +1 -1
- {imsciences-0.6.2.7 → imsciences-0.6.2.9}/imsciences/datafunctions.py +9 -9
- {imsciences-0.6.2.7 → imsciences-0.6.2.9}/imsciences.egg-info/PKG-INFO +1 -1
- {imsciences-0.6.2.7 → imsciences-0.6.2.9}/setup.py +1 -1
- {imsciences-0.6.2.7 → imsciences-0.6.2.9}/README.md +0 -0
- {imsciences-0.6.2.7 → imsciences-0.6.2.9}/imsciences/__init__.py +0 -0
- {imsciences-0.6.2.7 → imsciences-0.6.2.9}/imsciences.egg-info/PKG-INFO-IMS-24Ltp-3 +0 -0
- {imsciences-0.6.2.7 → imsciences-0.6.2.9}/imsciences.egg-info/SOURCES.txt +0 -0
- {imsciences-0.6.2.7 → imsciences-0.6.2.9}/imsciences.egg-info/dependency_links.txt +0 -0
- {imsciences-0.6.2.7 → imsciences-0.6.2.9}/imsciences.egg-info/requires.txt +0 -0
- {imsciences-0.6.2.7 → imsciences-0.6.2.9}/imsciences.egg-info/top_level.txt +0 -0
- {imsciences-0.6.2.7 → imsciences-0.6.2.9}/setup.cfg +0 -0
|
@@ -232,10 +232,10 @@ class dataprocessing:
|
|
|
232
232
|
print(" - Usage: week_commencing_2_week_commencing_conversion(df,date_col,week_commencing='sun')")
|
|
233
233
|
print(" - Example: week_commencing_2_week_commencing_conversion(df,'obs,week_commencing='mon')")
|
|
234
234
|
|
|
235
|
-
print("\n42.
|
|
236
|
-
print(" - Description:
|
|
237
|
-
print(" - Usage:
|
|
238
|
-
print(" - Example:
|
|
235
|
+
print("\n42. plot_chart")
|
|
236
|
+
print(" - Description: Plots a range of charts including line, area, scatter, bubble, bar etc.")
|
|
237
|
+
print(" - Usage: plot_chart(df, date_col, value_cols, chart_type='line', title='Chart', x_title='Date', y_title='Values', **kwargs)")
|
|
238
|
+
print(" - Example: plot_chart(df, 'obs', df.cols, chart_type='line', title='Spend Over Time', x_title='Date', y_title='Spend')")
|
|
239
239
|
|
|
240
240
|
|
|
241
241
|
|
|
@@ -763,8 +763,8 @@ class dataprocessing:
|
|
|
763
763
|
pandas.DataFrame: DataFrame with a new column containing the look up table results.
|
|
764
764
|
"""
|
|
765
765
|
|
|
766
|
-
# Create regex pattern from the dictionary
|
|
767
|
-
regex_pattern = "|".join(re.escape(key) for key in to_find_dict.keys())
|
|
766
|
+
# Create regex pattern with word boundaries from the dictionary
|
|
767
|
+
regex_pattern = "|".join(r'\b' + re.escape(key) + r'\b' for key in to_find_dict.keys())
|
|
768
768
|
|
|
769
769
|
# Preprocess DataFrame if multiple columns
|
|
770
770
|
if len(col_names) > 1:
|
|
@@ -1498,7 +1498,7 @@ class dataprocessing:
|
|
|
1498
1498
|
df[new_col_name] = df[column_name].apply(categorize_text)
|
|
1499
1499
|
return df
|
|
1500
1500
|
|
|
1501
|
-
def compare_overlap(df1, df2, date_col):
|
|
1501
|
+
def compare_overlap(self,df1, df2, date_col):
|
|
1502
1502
|
"""
|
|
1503
1503
|
Compare overlapping periods between two DataFrames and provide a summary of total differences.
|
|
1504
1504
|
|
|
@@ -1554,7 +1554,7 @@ class dataprocessing:
|
|
|
1554
1554
|
return diff_df, total_diff_df
|
|
1555
1555
|
|
|
1556
1556
|
# Convert week commencing col (should be most likely monday to sunday or vice versa)
|
|
1557
|
-
def week_commencing_2_week_commencing_conversion(df,date_col,week_commencing='sun'):
|
|
1557
|
+
def week_commencing_2_week_commencing_conversion(self,df,date_col,week_commencing='sun'):
|
|
1558
1558
|
"""
|
|
1559
1559
|
Convert week commencing column in a DataFrame to the start of another day specified.
|
|
1560
1560
|
|
|
@@ -1572,7 +1572,7 @@ class dataprocessing:
|
|
|
1572
1572
|
|
|
1573
1573
|
return df
|
|
1574
1574
|
|
|
1575
|
-
def plot_chart(df, date_col, value_cols, chart_type='line', title='Chart', x_title='Date', y_title='Values', **kwargs):
|
|
1575
|
+
def plot_chart(self, df, date_col, value_cols, chart_type='line', title='Chart', x_title='Date', y_title='Values', **kwargs):
|
|
1576
1576
|
"""
|
|
1577
1577
|
Plot various types of charts using Plotly.
|
|
1578
1578
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|