57079/wanted-to-change-the-entire-row-where-index-is-how-can-do-that
Import the file as a pandas dataframe and then you this code(Make necessary changes):
import pandas as pd df = pd.read_csv("<path/to/file>") df.loc[9]=["asdad","atrptort"] print(df)
Thanks alot. I have one more problem now i wanted to change the date time format to YYYY-MM-SS HH:MM:SS so can you please suggest some peace of code to satisfy this solution.
Thanks.
Try this:
import datetime date1 = "3/05/18 12:39" date, time = date1.split(' ') date2 = datetime.datetime.strptime(date, '%d/%m/%y').strftime('%Y/%m/%d') date2 = (date2+' '+time) print(date2)
Hey, @Subi, Regarding your query, you can go ...READ MORE
You probably want to use np.ravel_multi_index: [code] import numpy ...READ MORE
You can use str(variablename) This is called conversion ...READ MORE
You can find the explanation and implementation ...READ MORE
Hi @Mike. First, read both the csv ...READ MORE
Hey, Web scraping is a technique to automatically ...READ MORE
Hello @kartik, Since Python 3 is fairly mainstream, ...READ MORE
Hi, @Reebika, You can inherit the inbuilt user ...READ MORE
suppose you have a string with a ...READ MORE
suppose you have a list with the ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.