Skip to content

Commit

Permalink
2.1.4 - Fixed deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
fbdesignpro committed Jun 8, 2022
1 parent 531b179 commit 3e37891
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change log

#### 2.1.4 - 2022-06-08

- **Fixed:** removed deprecation warnings

#### 2.1.3 - 2021-07-08

- **Enhanced:** added info tag for comet.ml-generated reports
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![v](https://img.shields.io/badge/version-2.1.3-blue) ![v](https://img.shields.io/badge/updated-July%208,%20%202021-green)
![v](https://img.shields.io/badge/version-2.1.4-blue) ![v](https://img.shields.io/badge/updated-June%208,%20%202022-green)

![Sweetviz Logo](http://cooltiming.com/SV/logo.png)

Expand Down
2 changes: 1 addition & 1 deletion sweetviz/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# sweetviz public interface
# -----------------------------------------------------------------------------------
__title__ = 'sweetviz'
__version__ = "2.1.3"
__version__ = "2.1.4"
__author__ = "Francois Bertrand"
__license__ = 'MIT'

Expand Down
11 changes: 7 additions & 4 deletions sweetviz/graph_associations.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,16 @@ def __init__(self, dataframe_report, which_graph: str, association_data):
def make_zero_square_dataframe(features):
new_dataframe = pd.DataFrame()
# Add columns
empty_row_dict = dict()
# empty_row_dict = dict()
for feature in features:
new_dataframe[feature] = pd.Series(dtype=float)
empty_row_dict[feature] = 0.0
# empty_row_dict[feature] = 0.0
new_dataframe = new_dataframe.reindex(list(range(0, len(features)))).reset_index(drop=True).fillna(0.0)
# Add series
for categorical in features:
new_dataframe = new_dataframe.append(pd.Series(empty_row_dict, name=feature))
# for categorical in features:
# # UPDATE: series.append is deprecated!
# new_dataframe = new_dataframe.append(pd.Series(empty_row_dict, name=feature))
# # new_dataframe = pd.concat([new_dataframe, pd.Series(empty_row_dict, name=feature)], axis=1, join='outer', ignore_index=False)
# MUST DROP INDEX GRRRR
return new_dataframe.reset_index(drop=True)

Expand Down
5 changes: 4 additions & 1 deletion sweetviz/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ def get_clamped_value_counts(value_counts: pd.Series, max_categories_incl_other:

else:
other_series = pd.Series([total_in_other], index=[OTHERS_GROUPED])
clamped_series = clamped_series.append(other_series, ignore_index=False)

# UPDATE: series.append is deprecated!
clamped_series = pd.concat([clamped_series, other_series])
# clamped_series = clamped_series.append(other_series, ignore_index=False)
# assert(clamped_series.equals(clamped_seriesOLD))
return clamped_series


Expand Down

0 comments on commit 3e37891

Please sign in to comment.