11 comments

[ 3.8 ms ] story [ 36.9 ms ] thread
I'd say that's because df[start:stop] mimics python's builtin list slicing, which includes start but excludes end, so this dictates the behaviour of indexing without .loc. By contrast, df.loc[start:stop] is a label-based indexer, and labels can be anything (integers, strings, datetimes, categories, etc.), so it doesn't always make sense to exclude the right endpoint of the interval.
Curious, for stuff like this, why not just use sql(sqlite)?
There are some things which Pandas is just better at, such as: extracting content via RegEx and pivoting... However, there are also some situations where you should use SQL such as UPSERT or date-range joins.
Thanks! Didn't know python had magic functions so I was really confused.
I wanted to try to analyze application logs (usually a timestamp and some text) but all examples in pandas deal with numbers.

Is this useful for the analysis of such data (with a machine learning mid term goal (clustering and anomaly detection)?

Linear optimization and generating some simple graphs. I would like to be able to at least generate the graphs automatically from my database.
> Linear optimization

Did you mean linear regression? Linear optimization isn't a use case that Pandas covers, but there are other tools that I can recommend.

Yes, that's what I meant.
(comment deleted)
> pandas is heavily influenced and inspired by R.

Is it? How so?

I would recommend to "keep fighting with Pandas". Many of its feature seem confusing at first, but later on you see the value of them.