Python3-valueError :not enough values to unpack (expected 2, got 0)
Specific errors are as follows:
Specific errors are as follows:
Traceback (most recent call last):
File "/Users/zhangsf/code/python/my-project/Subsidy.py", line 83, in <module>
xy1.boxplot(column='ranking', by='subsidy')
File "/Users/zhangsf/anaconda3/lib/python3.7/site-packages/pandas/plotting/_core.py", line 2254, in boxplot_frame
return_type=return_type, **kwds)
File "/Users/zhangsf/anaconda3/lib/python3.7/site-packages/pandas/plotting/_core.py", line 2223, in boxplot
return_type=return_type)
File "/Users/zhangsf/anaconda3/lib/python3.7/site-packages/pandas/plotting/_core.py", line 2682, in _grouped_plot_by_column
keys, values = zip(*gp_col)
ValueError: not enough values to unpack (expected 2, got 0)
It means that python expected there to be two return values from zip(), but there were none.
Error: This means that Python expects zip () to return two values, but neither
The error statement is:
xy1.boxplot(column='ranking', by='subsidy')
The reason is that there is a problem with the imported data, which causes the ranking of the column to be NaN and no return value
Just re-introduce the correct data
Read More:
- ValueError: not enough values to unpack (expected 6, got 1)
- Error occurred when Python called cv2.findcontours: valueerror: not enough values to unpack (expected 3, got 2)
- ValueError: not enough values to unpack (expected 2, got 0)
- Error: improvement of not enough values to unpack (expected 2, got 1)
- for k, v in k_map: ValueError: too many values to unpack (expected 2)
- ValueError: too many values to unpack
- ValueError: need more than 0 values to unpack
- valueError: Length mismatch: Expected axis has 40 elements, new values have 38 elements
- [solved] error: valueerror: expected 2D array, got scalar array instead
- ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 256,
- ValueError: num_samples should be a positive integer value, but got num_samp=0
- Git push failed, prompt unpack error / unpack failed solution
- Android:More than one file was found with OS independent path ‘res/values/values.xml
- raise ValueError(‘Expected input batch_size ({}) to match target batch_size ({}).‘
- Ora-00947: not enough values
- Python common error: if using all scalar values, you must pass an index (four solutions)
- python got an unexpected keyword argument
- Python: How to Fix “Ord() expected string of length 1, but int found”
- [Solved] RuntimeError: Expected object of scalar type Float but got scalar type Double for argument #2 ‘mat1‘
- Python learning notes (5) — cross entropy error runtimeerror: 1D target tensor expected, multi target not supported