Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

silhoutte.py - TypeError #1

Open
vanlammessa opened this issue Feb 27, 2020 · 0 comments
Open

silhoutte.py - TypeError #1

vanlammessa opened this issue Feb 27, 2020 · 0 comments

Comments

@vanlammessa
Copy link

Hello,

silhouette.py line 19, the second variable "feature_count_end_column" is not converted to integer, which gives a TypeError.

Traceback (most recent call last):
File "/home/vanessa/tools/GRADitude/bin/graditude", line 1361, in
main()
File "/home/vanessa/tools/GRADitude/bin/graditude", line 1074, in main
args.func(args)
File "/home/vanessa/tools/GRADitude/bin/graditude", line 1151, in silhouette_analysis
args.max_number_of_clusters)
File "/home/vanessa/tools/GRADitude/bin/graditudelib/silhouette.py", line 12, in silhouette_analysis
feature_count_start_column, feature_count_end_column)
File "/home/vanessa/tools/GRADitude/bin/graditudelib/silhouette.py", line 19, in _extract_value_matrix
return feature_count_table_df.iloc[:, int(feature_count_start_column):feature_count_end_column]
File "/home/vanessa/anaconda3/lib/python3.6/site-packages/pandas/core/indexing.py", line 1472, in getitem
return self._getitem_tuple(key)
File "/home/vanessa/anaconda3/lib/python3.6/site-packages/pandas/core/indexing.py", line 2029, in _getitem_tuple
retval = getattr(retval, self.name)._getitem_axis(key, axis=axis)
File "/home/vanessa/anaconda3/lib/python3.6/site-packages/pandas/core/indexing.py", line 2080, in _getitem_axis
return self._get_slice_axis(key, axis=axis)
File "/home/vanessa/anaconda3/lib/python3.6/site-packages/pandas/core/indexing.py", line 2048, in _get_slice_axis
slice_obj = self._convert_slice_indexer(slice_obj, axis)
File "/home/vanessa/anaconda3/lib/python3.6/site-packages/pandas/core/indexing.py", line 266, in _convert_slice_indexer
return ax._convert_slice_indexer(key, kind=self.name)
File "/home/vanessa/anaconda3/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 1691, in _convert_slice_indexer
self._validate_indexer('slice', key.stop, kind),
File "/home/vanessa/anaconda3/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 4128, in _validate_indexer
self._invalid_indexer(form, key)
File "/home/vanessa/anaconda3/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 1848, in _invalid_indexer
kind=type(key)))
TypeError: cannot do slice indexing on <class 'pandas.core.indexes.base.Index'> with these indexers [33] of <class 'str'>

Best regards,
Vanessa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant