hello,sir. Recently I want to run your code. I download the dataset and have processed it with text_to_csv.py , normalize_data.py , bin_data.py. But when I run the csv_to_npy.py,I meet a bug just like this:
Traceback (most recent call last):
File "csv_to_npy.py", line 61, in
main(args)
File "csv_to_npy.py", line 55, in main
csv_to_npy(arguments.csv_path, arguments.npy_path, arguments.npy_filename)
File "csv_to_npy.py", line 17, in csv_to_npy
df = df.drop_duplicates(subset=df, keep="first", inplace=False)
File "C:\Users\DELL\Anaconda3\envs\tf2.0-gpu\lib\site-packages\pandas\core\frame.py", line 4811, in drop_duplicates
duplicated = self.duplicated(subset, keep=keep)
File "C:\Users\DELL\Anaconda3\envs\tf2.0-gpu\lib\site-packages\pandas\core\frame.py", line 4883, in duplicated
diff = Index(subset).difference(self.columns)
File "C:\Users\DELL\Anaconda3\envs\tf2.0-gpu\lib\site-packages\pandas\core\indexes\base.py", line 420, in new
return Index(np.asarray(data), dtype=dtype, copy=copy, name=name, **kwargs)
File "C:\Users\DELL\Anaconda3\envs\tf2.0-gpu\lib\site-packages\pandas\core\indexes\base.py", line 390, in new
return Int64Index(data, copy=copy, dtype=dtype, name=name)
File "C:\Users\DELL\Anaconda3\envs\tf2.0-gpu\lib\site-packages\pandas\core\indexes\numeric.py", line 78, in new
raise ValueError("Index data must be 1-dimensional")
ValueError: Index data must be 1-dimensional
The code "df = df.drop_duplicates(subset=df, keep="first", inplace=False)" seems do not work well. I do not make any change in code.I also try to print the head of df, the result is that
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
0 1 4 0 2 6 4 6 2 4 1 6 6 4 1 0 0 0 1 2 4 0 1
1 6 6 1 3 6 4 6 2 4 1 6 6 4 2 0 0 0 0 7 0 0 1
2 9 4 9 9 6 4 6 2 4 1 6 6 4 3 0 0 0 0 3 0 0 1
3 5 4 0 2 6 4 6 2 4 1 6 6 4 1 0 0 0 1 2 4 0 1
4 5 4 0 2 6 4 6 2 4 1 6 6 4 1 0 0 0 1 2 4 0 1
5 1 4 0 2 6 4 6 2 4 1 6 6 4 1 0 0 0 1 5 9 0 2
6 5 4 0 2 6 4 6 2 4 1 6 6 4 1 0 0 0 1 2 4 0 1
7 1 4 0 2 6 4 6 2 4 1 6 6 4 1 0 0 0 0 9 0 0 1
8 5 4 0 2 6 4 6 2 4 1 6 6 4 1 0 0 0 1 2 4 0 1
9 5 4 0 2 6 4 6 2 4 1 6 6 4 1 0 0 0 1 2 4 0 1
can you help me and give me some questions?