Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Name,ICO,Max,USD_ROI
- Bitcoin,0.0,19535.7,N/A
- Ethereum,0.0,1389.18,N/A
- Ripple,0.0,3.6491,N/A
- Bitcoin Cash,0.0,4091.7,N/A
- EOS,0.99,21.4637,2068.05%
- BTC_ROI,ETH_ROI
- N/A,N/A
- N/A,N/A
- N/A,N/A
- N/A,N/A
- N/A,N/A
- -260.77%,-130.75%
- import pandas as pd
- f = open("pt1.txt","w+")
- df = pd.read_csv("pt2.txt")
- f.write(df["BTC_ROI"])
- f.write(df["ETH_ROI"])
- TypeError: write() argument must be str, not Series
- Name,ICO,Max,USD_ROI,BTC_ROI,ETH_ROI
- Bitcoin,0.0,19535.7,N/A,N/A,N/A
- Ethereum,0.0,1389.18,N/A,N/A,N/A
- Ripple,0.0,3.6491,N/A,N/A,N/A
- Bitcoin Cash,0.0,4091.7,N/A,N/A,N/A
- EOS,0.99,21.4637,2068.05%,-260.77%,-130.75%
- df1 = pd.read_csv('pt1.txt')
- df2 = pd.read_csv('pt2.txt')
- (pd.concat([df1, df2], axis=1, ignore_index=True)
- .to_csv('pt2.txt', index=False, na_rep='N/A')
Add Comment
Please, Sign In to add comment