Questions tagged [import-csv]

Import_Csv is a PowerShell command that creates a custom, table-like object and populates it with data from a CSV file. DO NOT use this tag for generally reading data from a CSV file. Instead, use the [csv] tag or other language-specific related tags

320 questions
9
votes
2 answers

Out-GridView is showing a blank column where there is actual data

I have this CSV file. The actual CSV data is delimited with a ";" , like this: [2017-04-27 15:45:04] ;x;/x;Succes; You can see there is a column "Terminaison" which contains success or failure information. My goal is to display all columns of the…
Rakha
  • 1,874
  • 3
  • 26
  • 60
8
votes
1 answer

Import-Csv / Export-Csv with german umlauts (ä,ö,ü)

i came across a little issue when dealing with csv-exports which contains mutated vowels like ä,ö,ü (German Language Umlaute) i simply export with Get-WinEvent -FilterHashtable @{Path=$_;ID=4627} -ErrorAction SilentlyContinue |export-csv…
Peter Core
  • 193
  • 1
  • 2
  • 16
6
votes
2 answers

PowerShell: Importing 16MB CSV Into PowerShell Variable Creates >600MB's of PowerShell Memory Usage

I'm trying to understand why PowerShell's memory balloons so much when I import a file that's ~16MB's as a variable. I can understand there's additional memory structure around that variable but I'm just trying to understand why it's THAT high.…
6
votes
2 answers

How to get data from csv into a python object

I am a beginner python user. Having trouble getting data from csv into python in the required object format to satisfy a python function. If I manually created the data in python (rather than bringing it in from csv) the following code works: class…
user8891420
  • 63
  • 1
  • 1
  • 5
6
votes
2 answers

Load csv to redshift without passing by S3

I am using SQL workbench /J to interact with a redshift cluster and I would like to load a CSV file (about 500k rows) into a redshift table (I do have insert privilege) without using COPY command (as i do not have privileges to copy into s3). Do…
Amine
  • 225
  • 3
  • 13
3
votes
1 answer

Powershell import of a CSV file with line break in the header

For a project i would need to export data from an .xlsm file data to a CSV file and then process it with powershell. I do the export manually. In the original file, there are line breaks in the headers, which are also transferred to the CSV file. My…
Eduard M.
  • 57
  • 1
  • 4
3
votes
3 answers

How to specify column position when adding new column to a csv file using PowerShell

How can I specify the column position when adding a new column to an existing csv file? I want to add the new column as second column (Not at the end what the default is). The first column is always the same, but the other columns can differ per…
John Doe
  • 9,843
  • 13
  • 42
  • 73
3
votes
2 answers

Import a CSV, run port connection, then export to new csv

I have a Sources.csv which has columns "Source," "Host" and "Port" (Source is just the name of the device I'm trying to connect to). My goal is to go line-by-line through this CSV, run a connection test to the IP and Port, then export to a new csv…
Christopher Cass
  • 817
  • 4
  • 19
  • 31
3
votes
2 answers

how to get the column headers for CSV data with Powershell?

How can I get the column headers for CSV data? Here is the specific data: PS /home/nicholas/powershell/covid> PS /home/nicholas/powershell/covid> $labsURL='http://www.bccdc.ca/Health-Info-Site/Documents/BCCDC_COVID19_Dashboard_Lab_Information.csv' …
3
votes
1 answer

Rails CSV IMPORT first_or_create

Hi I have a very basic csv importer that a user uses to import items. Items belong_to a :part_number When the user imports the items I want to add a first or create to the import to find or create a part number by its name. CSV File columns i want…
Joe Bloggos
  • 889
  • 7
  • 24
3
votes
2 answers

How to search imported CSV cell values for each row

I'm attempting to import a csv, search the cell values(columns) in each row and then find and count any null or blank values. Then if the count hits 13, do X. However, when I run this code it appears the cell/column values are a single object and…
MrMr
  • 483
  • 1
  • 9
  • 25
3
votes
4 answers

Loading two arrays from a CSV

I have a CSV File that has two columns Employee and Manager and I would like to import them into two Variables for use later in my script. However when I run my code it only captures the last data item in the CSV as the previous one is being over…
JRN
  • 269
  • 1
  • 3
  • 19
3
votes
1 answer

Unable to access a csv file in Google Colaboratory

I am using Google Colaboratory to run my machine learning project. I wanted to import .csv into pandas and use it for further processing, but I am facing an error stating that the file is not found. Do I need to provide any authorization to access…
3
votes
1 answer

Use first row of CSV file as column name SQL

I am using Microsoft SQL Server Management studio and I am currently importing some CSV files in a database. I am importing the CSV files using the BULK INSERT command into already existing tables, using the following query. BULK INSERT myTable …
Nisfa
  • 359
  • 1
  • 4
  • 16
3
votes
2 answers

PowerShell Import-CSV to Export-CSV with type conversion

I get a bunch of tab-delimited files and I want to convert them to comma-delimited files. I also need only two columns from the file "Date" and "Value1", so I drop the rest of the columns. Date Value1 Value2 Value3 Value4 Sensor 08.07.2010 …
Ale
  • 247
  • 3
  • 10
1
2 3
21 22