You are right. Element 4 should be included and 2 should be excluded.
a[2:3] should produce and output of array([3,4])
You are right. Element 4 should be included and 2 should be excluded.
a[2:3] should produce and output of array([3,4])
This is because the parser is trying to parse `utf-8` data, but the file is in another encoding.
You can solve this error by adding another parameter "encoding" and specify the encoding used.
Change your code to `data = pd.read_csv('UKretail.csv', encoding = "latin1")` and this should work.
This is because the parser is trying to parse `utf-8` data, but the file is in another encoding.
You can solve this error by adding another parameter "encoding" and specify the encoding used.
Change your code to `data = pd.read_csv('UKretail.csv', encoding = "latin1")` and this should work.
By mistake I did, "a = a.flatten" instead of "a = a.flatten()". After this my array "a" was converted into a builtin function, I checked the type of "a" and it was "builtin_function_or_method" instead of "numpy.ndarray". I know my array was converted into a function but I don't understand how it actually got converted and what sort of a function it is now and what all operations I can perform using it. It would be great help if you elaborate on this issue. Thanks in advance :)