R
To Read multiple CSV Files in R into a single Dataframe.
[Read More]
Dealing with Dates in R
To convert a character object into a date format, use the as.POSIXlt() function.
This takes two arguments, the character object and a format specifying the date format as represented in the character object.
[Read More]
Using GroupBy and Aggregate on Python Dataframes
Let’s say we have a dataset containing data with movie reviews as shown below. This is stored as a pandas dataframe ‘df’.
[Read More]
to.csv() in Pandas formats string as Date.
While Using the to.csv() function to write a Pandas DataFrame to a csv file, if your dataframe has ratios (1/4 shows up as Jan-4th), these are automatically parsed as a date when you open up the csv in excel and hence the original interpretation is lost, even though the underlying...
[Read More]
If Else in List Comprehension, Python
In a python List Comprehension, the usual style of using an if statement is as below:
[Read More]