Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: text = str(text.encode('utf-8')) AttributeError: 'float' object has no attribute 'enc
Post: RE: text = str(text.encode('utf-8')) AttributeErro...
Here is the full error message. The line from the title is part from this message.
Output:Traceback (most recent call last):
File "<ipython-input-1-2b37aa124c89>", line 10, in <module>... |
|
ulrich48155 |
Homework |
2 |
8,749 |
Jul-31-2017, 05:21 PM |
|
|
Thread: text = str(text.encode('utf-8')) AttributeError: 'float' object has no attribute 'enc
Post: text = str(text.encode('utf-8')) AttributeError: '...
Im trying to do a sentiment analysis of Twitter tweets on different topics. Thereby, some topics produce the following error message:
AttributeError: 'float' object has no attribute 'encode'
What s... |
|
ulrich48155 |
Homework |
2 |
8,749 |
Jul-31-2017, 05:15 AM |
|
|
Thread: ValueError: shape mismatch: value array of shape...
Post: RE: ValueError: shape mismatch: value array of sha...
Thank you very much, but with both approaches I get this error message:
Error:ValueError: Can't handle mix of continuous and binary |
|
ulrich48155 |
Homework |
2 |
23,731 |
Jul-10-2017, 02:17 PM |
|
|
Thread: ValueError: shape mismatch: value array of shape...
Post: ValueError: shape mismatch: value array of shape.....
When trying to do a linear discriminant analysis I always get this error:
Error:ValueError: shape mismatch: value array of shape (47,) could not be broadcast to indexing result of shape (47,1)So I th... |
|
ulrich48155 |
Homework |
2 |
23,731 |
Jul-09-2017, 08:37 AM |
|
|
Thread: Visualisation of gaps in time series data
Post: RE: Visualisation of gaps in time series data
Thanks, that worked!!! My plot now looks like this:
[Image: http://imgur.com/a/zUcgC]
Is it maybe possible to display those dates on the x-axis which start and end a data gap? So that one can easily... |
|
ulrich48155 |
Homework |
11 |
19,334 |
Jun-27-2017, 07:10 PM |
|
|
Thread: Visualisation of gaps in time series data
Post: RE: Visualisation of gaps in time series data
Thanks again. Now my code looks like this:
import pandas as pd
from matplotlib import pyplot as plt
import numpy as np
colnames=['Timestamp','Currency','Rate','Volume']
usecols=['Timestamp','Currenc... |
|
ulrich48155 |
Homework |
11 |
19,334 |
Jun-25-2017, 03:13 PM |
|
|
Thread: Visualisation of gaps in time series data
Post: RE: Visualisation of gaps in time series data
Thanks for your help so far! After your comments I came up with this solution:
import pandas as pd
import missingno as mn
colnames=['Timestamp','Currency','Rate','Volume']
usecols=['Timestamp','Rate... |
|
ulrich48155 |
Homework |
11 |
19,334 |
Jun-24-2017, 11:19 AM |
|
|
Thread: Visualisation of gaps in time series data
Post: RE: Visualisation of gaps in time series data
To be quite honest I dont have anything yet except for loading my .csv file as I got no clue how and where to start. Apart from doing some easy plotting with matplotlib I dont have any experience with... |
|
ulrich48155 |
Homework |
11 |
19,334 |
Jun-23-2017, 08:38 PM |
|
|
Thread: Visualisation of gaps in time series data
Post: RE: Visualisation of gaps in time series data
Oh yeah, sorry! As this is data mined from Twitter, there are 'normal' gaps between every timestamp of around 3h. These can be neglected. The gabs I mean are those spanning over days or even weeks lik... |
|
ulrich48155 |
Homework |
11 |
19,334 |
Jun-22-2017, 08:17 PM |
|
|
Thread: Visualisation of gaps in time series data
Post: Visualisation of gaps in time series data
From my university project I got time series data. Unfortunately, my time series has some gaps due to technical issues. Is it possible to visualise these gaps?
I was thinking of something like this:
... |
|
ulrich48155 |
Homework |
11 |
19,334 |
Jun-22-2017, 06:05 PM |
|
|
Thread: Removing data in a plot
Post: RE: Removing data in a plot
Thank you very much!
Is there a difference between the first and the second approach? When I try to implement the second one into my loop I get this message:
Error:TypeError: 'generator' object is n... |
|
ulrich48155 |
Homework |
3 |
3,803 |
Jun-10-2017, 07:38 PM |
|
|
Thread: Removing data in a plot
Post: Removing data in a plot
For a project I needed to calculate and display a 10fold cross-validation on a time-series. After plotting my results look like this:
http://imgur.com/a/15wbF
As you can see, both plots also contain... |
|
ulrich48155 |
Homework |
3 |
3,803 |
Jun-08-2017, 02:25 PM |
|
|
Thread: CSV file with irregular structure
Post: RE: CSV file with irregular structure
It seems like every tweet which were seperated by blank lines is now seperate by blank rows.
I attached a sample which contains tweets after using that code.
When I try to read the file and define '... |
|
ulrich48155 |
Homework |
9 |
7,068 |
May-22-2017, 06:11 PM |
|
|
Thread: CSV file with irregular structure
Post: RE: CSV file with irregular structure
My prof specified '|' as the only delimiter.
Thanks for that code! That really helped me **dance**
Do you think it would even be possible to really connect the parts that were splitted over differe... |
|
ulrich48155 |
Homework |
9 |
7,068 |
May-17-2017, 06:31 PM |
|
|
Thread: CSV file with irregular structure
Post: RE: CSV file with irregular structure
I got this file from my professor in order to do a sentiment analysis, but I got problems due to these damaged rows.
I attached the csv file including 30rows. The columns are seperated with a '|'. |
|
ulrich48155 |
Homework |
9 |
7,068 |
May-16-2017, 01:07 PM |
|
|
Thread: CSV file with irregular structure
Post: CSV file with irregular structure
I got a CSV file with about 500.000 lines of twitter tweets. The file is structured as follows:
Timestamp1 | Topic | Timestamp2 | User | Message | RetweetCount | Location
The problem I have is that... |
|
ulrich48155 |
Homework |
9 |
7,068 |
May-16-2017, 10:40 AM |
|
|
Thread: Sentiment Analysis with NLTK Vader - Writing data in one row
Post: Sentiment Analysis with NLTK Vader - Writing data ...
Hello python experts,
for an university project I want to do an sentiment analysis of twitter tweets with the NLTK package. Therefore, my code looks this:
sid = SentimentIntensityAnalyzer()
for sent... |
|
ulrich48155 |
Homework |
1 |
4,123 |
May-14-2017, 07:02 PM |
|
|
Thread: 10fold cross-validation on time series
Post: RE: 10fold cross-validation on time series
I think my problem is that I dont know how to implement the calculation of the RMSE for the different folds. I am splitting my set into 10folds which seemed to work:
Output:TRAIN: [ 0 1 2 ..., 28 29... |
|
ulrich48155 |
Homework |
5 |
9,213 |
May-08-2017, 04:36 PM |
|
|
Thread: 10fold cross-validation on time series
Post: RE: 10fold cross-validation on time series
Is my approach right then? |
|
ulrich48155 |
Homework |
5 |
9,213 |
May-06-2017, 09:15 AM |
|
|
Thread: 10fold cross-validation on time series
Post: RE: 10fold cross-validation on time series
Thanks for your reply! I should've posted the whole code. It looks like this:
import pandas as pd
import numpy as np
from sklearn import metrics
from sklearn.linear_model import LinearRegression
from... |
|
ulrich48155 |
Homework |
5 |
9,213 |
May-05-2017, 01:24 PM |