• Register
search
Log In

Recent questions tagged pandas

0 votes
0 answers 10 views
import cv2, time, pandas import numpy as np from termcolor import colored import datetime import pandas as pd import matplotlib.pyplot as plt import os import pyautogui from bokeh.plotting import figure, show, output_file from bokeh.models import HoverTool, ColumnDataSource first_frame = None ... ).strftime("%Y-%m-%d_%H%M%S")+".html") show(p) #plt.savefig('plot.pdf', dpi=300, bbox_inches='tight')
asked Jun 13 Shivi Trivedi
1 vote
2 answers 54 views
Anyone aware of this error. I am facing this issue in this function. It is not going to IF statement where I put my filter condition which is true then simply raise Error and without IF it is working but I want to put the filter condition which checks date between ... "value"]) It is not going to IF statement where I put my filter condition which is true then simply raise Error. Any suggestion?
asked May 8 Kashish
2 votes
1 answer 364 views
Problem : I am very new to Python and Pandas. Currently I am learning to use the Pandas so that I can convert my column to month. When I try to read my data then they are objects. So I am first of all trying to make them to the date time and ... " 2529 "values") 2530 AttributeError: Can only use .dt accessor with datetimelike values Looking for help from Pandas expert to fix my above error.
asked Apr 29 stewart 4k points
1 vote
1 answer 28 views
Problem : I am very new to Python. While trying to execute my code I am facing below warning C:\Python27\lib\site-packages\pandas\core\indexing.py:411: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer ... '] = mydf.review_text.map(lambda x: tokenizer.tokenize(x)) print mydf[:3] I am looking for expert help to fix above error.
asked Apr 27 stewart 4k points
1 vote
1 answer 439 views
Problem : I am new to Python and Pandas. The astype in my below code raises the ValueError if I use the dict of columns. Now I am trying to convert a type of sparse column in the big DF (from float to int). But the problem is with a NaN values. I ... error I am facing currently: ValueError: Cannot convert non-finite values (NA or inf) to integer . I need experts help to fix above ValueError.
asked Apr 23 stewart 4k points
1 vote
1 answer 192 views
Problem : Currently I am learning Pandas. I want to do inner join DataFrame1 to DataFrame2. But I am facing below error. “Len(left_on) must equal the number of levels in the index of "right"” Please find below my join statement for your reference. merged = DataFrame1.join(DataFrame2, on=['Code','Date']) Please let me know why am I facing above error?
asked Mar 31 morrisBson 3.2k points
0 votes
2 answers 144 views
Problem : I am new to RandomForest model. While predicting my test data using the RandomForest model I am often facing below ValueError. “Input contains nan, infinity or a value too large for dtype('float64')” I have spent more than two days on the above error but I am unable to fix above error. Can somebody help me in fixing above error?
asked Feb 24 mphil 2.3k points
0 votes
1 answer 664 views
Problem : I have the two DataFrames which I would want to merge. I have referred many documents and also tried to perform many operations but I am not sure what to do now. Please find my two DataFrames as below: DataFrame1: id name type currency 0 BTTA.S Apple ... here I met with the exception as below : ValueError: can not merge DataFrame with instance of type <class 'pandas.core.series.Series'>
asked Dec 24, 2019 alecxe 7.5k points
0 votes
1 answer 1.6K views
Problem : I have the pandas data frame with some of the categorical predictors or variables as 0 & 1, and some of the numeric variables. When I fit that to a stasmodel like below : est = sm.OLS(y, X).fit() It throws the below error : Pandas data ... hundreds of variables. For that I have concatenated the 3 pandas DataFrames to come up with the final DataFrame to be used in the model building.
asked Dec 18, 2019 alecxe 7.5k points
0 votes
1 answer 187 views
Problem : I wanted to read all the csv files from my folder and after that concatenate them to create a big csv file. The structure of all my files was the same, After concatenating I want to save it and read it again. All this was done by me using Pandas. But I ... --> 3 l = list(csvreader) Error: new-line character seen in unquoted field - do you need to open the file in universal-newline mode?
asked Dec 3, 2019 alecxe 7.5k points
0 votes
1 answer 47 views
Problem : I am currently working on the TensorFlow that uses very "weird" format of uploading the data. I am trying to to use the NumPy or pandas format for the data to be uploaded, to compare it with scikit-learn results.Also I am getting the digit recognition ... value Variable_1 [[Node: gradients/add_grad/Shape_1 = Shape[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/cpu:0"](Variable_1)]]
asked Nov 30, 2019 alecxe 7.5k points
0 votes
1 answer 1.4K views
Problem : I have a big dataframe and I am trying to split that and after concat that but facing following error first argument must be an iterable of pandas objects, you passed an object of type "dataframe"
asked Nov 14, 2019 peterlaw 6.9k points
1 vote
2 answers 234 views
Problem : I am receiveing error as the truth value of a dataframe is ambiguous. use a.empty, a.bool(), a.item(), a.any() or a.all().
asked Nov 11, 2019 peterlaw 6.9k points
0 votes
1 answer 652 views
Problem : I am getting bellow error attributeerror: can only use .str accessor with string values, which use np.object_ dtype in pandas
asked Nov 7, 2019 peterlaw 6.9k points
To see more, click for the full list of questions or popular tags.