1

Can you please tell me how to remove the first column of the output of value_counts and save somewhere? I need to use the result only, e.g., in the output below, I have the dates in the first column and the occurrence count in the second column, now i want to remove the dates so I can use the occurrences somewhere else

This is in Pandas

17-06-2017    637
15-06-2017    549
19-06-2017    510
14-06-2017    460
18-06-2017    431
20-06-2017    332
16-06-2017    220
Name: Timestamp, dtype: int64

Thanks

I tried a couple of online suggestions, but could not get a direct suggestion

1
  • Result is a pd.Series. Use .values to access values as a numpy array. Generally you don't need to do that though, index (dates) isn't treated as values in pandas operations. Commented Nov 5, 2022 at 11:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.